glome/homeassistant/state_change_event

Types

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

Constructors

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

Functions

pub fn decode(json_string: String) -> Result(
  StateChangeEvent,
  GlomeError,
)