pub struct EntityToAccessoryMapper;Expand description
Maps a HOMECORE entity (EntityId, State) pair to a HapAccessoryType
and its current characteristic values.
Rule table (mirrors HA homekit_controller mapping):
| Domain | device_class | HAP service |
|---|---|---|
light | — | Lightbulb |
switch | — | Switch |
binary_sensor | occupancy | OccupancySensor |
binary_sensor | motion | MotionSensor |
binary_sensor | door / window | ContactSensor |
sensor | — + unit=°C/°F | TemperatureSensor |
sensor | — + unit=% (humidity) | HumiditySensor |
cover (door) | — | Door |
lock | — | Lock |
Implementations§
Auto Trait Implementations§
impl Freeze for EntityToAccessoryMapper
impl RefUnwindSafe for EntityToAccessoryMapper
impl Send for EntityToAccessoryMapper
impl Sync for EntityToAccessoryMapper
impl Unpin for EntityToAccessoryMapper
impl UnsafeUnpin for EntityToAccessoryMapper
impl UnwindSafe for EntityToAccessoryMapper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more