'Initialize the sensor.'

def __init__(self, hass, name, variable, payload, unit_of_measurement):

    self._state = STATE_UNKNOWN
    self._hass = hass
    self._name = name
    self._variable = variable
    self._payload = payload
    self._unit_of_measurement = unit_of_measurement
    hass.bus.listen(pilight.EVENT, self._handle_code)
