merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
392 stars 61 forks source link

Please add a possibility to switch the light off in homekit when it disconnects (this is for people with old-school wall switches) #486

Closed oleg77s closed 1 year ago

oleg77s commented 1 year ago

Hi! Describe the idea or improvement When my yeelight light disconnected from the line with old-school wall switch, Mode-Day switch is on and light is 100% on too in HomeKit. Describe the solution you'd like Please add some option as its done here: Optional per light configuration: offOnDisconnect?: boolean (optional) - switch the light off in homekit when it disconnects (this is for people with old-school wall switches) how its done in https://github.com/cellcortex/homebridge-yeelighter/blob/master/README.md Additional context

merdok commented 1 year ago

Hi, I do not quite understand the issue. When the light disconnects and the plugin cannot reach it anymore then the status should change to off, does that not happen?

oleg77s commented 1 year ago

yes, not happen IMG_7542

oleg77s commented 1 year ago

MiHome: IMG_7543

merdok commented 1 year ago

I noticed that also with other plugins, i think that this is an issue with the new home app which does not properly update the status. As soon as you disconnect your light and the plugin cannot reach it, the light will always return status off, just somehow the home app does not pick it up...

oleg77s commented 1 year ago

It's my mistake, HB was not on the local network, the connection to the lamps was only through MiCloud. BTW, it's possible to change the name Mode-Day/Mode-Nights to just Day/Night in plugin?

merdok commented 1 year ago

The names come from the miot spec, you can edit the switches in homekit and change the to what you want, just keep in mind that after a restart it will reset so you would need to rename it again.