glome/homeassistant/state_change_event

Types

pub type StateChangeEvent {
  StateChangeEvent(
    entity_id: EntityId,
    old_state: State,
    new_state: State,
  )
}

Constructors

  • StateChangeEvent(
      entity_id: EntityId,
      old_state: State,
      new_state: State,
    )

Functions

pub fn from_json(event_message: String) -> Result(
  StateChangeEvent,
  GlomeError,
)