'Initialize the sensor.'

def __init__(self, event, name, device_class=None, should_fire=False, off_delay=None, data_bits=None, cmd_on=None, cmd_off=None):

    self.event = event
    self._name = name
    self._should_fire_event = should_fire
    self._device_class = device_class
    self._off_delay = off_delay
    self._state = False
    self.is_lighting4 = False
    self.delay_listener = None
    self._data_bits = data_bits
    self._cmd_on = cmd_on
    self._cmd_off = cmd_off
    if (data_bits is not None):
        self._masked_id = rfxtrx.get_pt2262_deviceid(event.device.id_string.lower(), data_bits)
