ebaauw / homebridge-lib

Utility Library for Homebridge Plugins
Apache License 2.0
94 stars 12 forks source link

Q: what service/characteristic to use for a power fail sensor #16

Closed mrose17 closed 5 years ago

mrose17 commented 5 years ago

and, as long as i'm asking you random questions @ebaauw , i have a sensor that has two plugs: one is intended to plug into a UPS and the other into a wall outlet. if the power goes out on the wall outlet, it reports that.

what would you recommend for a service/characteristic to model this sensor?

thank you again!

ebaauw commented 5 years ago

I don't think there's a standard HomeKit characteristic for power failure, but you could map it to Status Fault. I don't think Apple's Home app would recognise it, though.

mrose17 commented 5 years ago

i agree that StatusFault probably isn't a winner. i'm thinking that the only thing that comes close is Switch, where power loss is indicated by (On = false)....