dgreif / homebridge-hatch-baby-rest

A homebridge plugin for Hatch Baby Rest night light
MIT License
74 stars 19 forks source link

Adding "switch" support HatchBabyRest accessory #11

Closed nicholasrobinson closed 4 years ago

nicholasrobinson commented 4 years ago

My baby's hatch was being deactivated by my catch-all turn off the lights at 2am rule...

I've added an optional service configuration parameter for the HatchBabyRest accessory, allowing the underlying HAP Service to be either a LightBulb ("light") or a Switch ("switch").

The Switch type allows the user to select from "Fan", "Switch" and "Light" in the Home app, giving greater flexibility.

nicholasrobinson commented 4 years ago

@dgreif

dgreif commented 4 years ago

Sorry for my slow response, life has been busy lately. I’ll try this merge and deployed sometime this week

dgreif commented 4 years ago

@nicholasrobinson Thanks for the PR! I ended up using a showAsSwitch option instead of service, just to make it a little easier for other users. Deployed in v2.0.0, which requires node 10+