@callback
def _handle_event(self, event, device_id):
    'Check if event applies to me and update.'
    if (device_id != self._device_id):
        return
    self._apply_event(event)
    self.async_write_ha_state()
Check if event applies to me and update.
@callback
def _handle_event(self, event, device_id):
    
    if (device_id != self._device_id):
        return
    self._apply_event(event)
    self.async_write_ha_state()