hass_entity_state/
lib.rs

1mod attributes;
2mod sensor;
3
4pub use attributes::{AttributeKey, AttributeValue, Attributes};
5
6pub trait EntityStateValue {}
7
8pub trait EntityState<'a, K, V>
9where
10  K: AttributeKey<'a>,
11  V: AttributeValue<'a>,
12{
13  type State: EntityStateValue;
14
15  fn get(&self) -> &Self::State;
16  fn get_mut(&mut self) -> &mut Self::State;
17
18  fn attributes(&self) -> &Attributes<'a, K, V, Self>;
19  fn attributes_mut(&mut self) -> &mut Attributes<'a, K, V, Self>;
20}