'Initialize the sensor.'

def __init__(self, hass, name, variable, payload, on_value, off_value):

    self._state = False
    self._hass = hass
    self._name = name
    self._variable = variable
    self._payload = payload
    self._on_value = on_value
    self._off_value = off_value
    hass.bus.listen(pilight.EVENT, self._handle_code)
