original_docstring: Check if event applies to me and update.
docstring: Check if event applies to me and update.
docstring_tokens: Check if event applies to me and update .
code: def _handle_event(self, event, device_id):
          """Check if event applies to me and update."""
          if device_id != self._device_id:
              return
  
          if self.entity_description.key not in event.values:
              return
  
          _LOGGER.debug(
              "Sensor update (Device ID: %s Class: %s Sub: %s)",
              event.device.id_string,
              event.device.__class__.__name__,
              event.device.subtype,
          )
  
          self._apply_event(event)
  
          self.async_write_ha_state()
code_tokens: def _handle_event ( self , event , device_id ) : if device_id != self . _device_id : return if self . entity_description . key not in event . values : return _LOGGER . debug ( "Sensor update (Device ID: %s Class: %s Sub: %s)" , event . device . id_string , event . device . __class__ . __name__ , event . device . subtype , ) self . _apply_event ( event ) self . async_write_ha_state ( )
short_docstring: Check if event applies to me and update.
short_docstring_tokens: Check if event applies to me and update .
comment: """Check if event applies to me and update."""