def _apply_event(self, event):
    'Apply command from rfxtrx.'
    super()._apply_event(event)
    if (event.values['Command'] in COMMAND_ON_LIST):
        self._state = True
    elif (event.values['Command'] in COMMAND_OFF_LIST):
        self._state = False
    elif (event.values['Command'] == 'Set level'):
        self._brightness = ((event.values['Dim level'] * 255) // 100)
        self._state = (self._brightness > 0)
Apply command from rfxtrx.
def _apply_event(self, event):
    
    super()._apply_event(event)
    if (event.values['Command'] in COMMAND_ON_LIST):
        self._state = True
    elif (event.values['Command'] in COMMAND_OFF_LIST):
        self._state = False
    elif (event.values['Command'] == 'Set level'):
        self._brightness = ((event.values['Dim level'] * 255) // 100)
        self._state = (self._brightness > 0)