And this is actually working perfectly in Home Assistant! So I have a switch in Home Assistant and if I click it, it will turn on and after a second turn off again. Also the relay will toggle.
But the HomeBridge component shows the switch in HomeKit as a normal switch. Meaning, if I press the switch in HomeKit, the status will go from Off to On and stay on. Even though In Home Assistant it will go off again after 1 sec.
So now I need to manually tap twice on the switch in HomeKit before I can again use it.
How are other people using toggle relays with the HomeBridge link?
Do I need to put the actual toggle in a Home Assistant automation instead of inside the ESPHome config yaml? Any other tips?
I see its late, but why do you use homebridge? Are there advantages or something? I use the HomeKit Component, wich transfers all my entities to HomeKit. Why should I use homebridge, when there is a native support for this in HA?
Thank you. I see you have implemented delay via home assistant automation.
I thought you solved homekit toggle problem, with the automation on esp side.
I’d rather want to have automatic turning off on esp side (as in your previous configuration)
The reasons for that are if network issues occur or HASS end down in the middle of automation. I wouldn’t like to destroy my doorbell leaving in turned on for long time or leave garage opener turned on. Also there might be reduced accuracy for time delay.
haaa I see, hmm no the ‘fix’ for me to get this working in HomeKit, was to bring over the delay to Home Assistant instead of leaving it in the ESPHome config
Hmm @VStonkus maybe moving the delay to Home Assistant was not necessary in my case.
My actual config to bring over the garage switch to HomeKit also consists of a cover.
So HomeKit will now notice if the garage is open or closed, by not looking at the ESP switch ( relay ) itself but instead using the state of a magnetic door sensor for the validation.
Triggering the open or close of the garage is done by calling the script. So in essence I could move the delay and toggle on to off back to ESP.
But not sure how you could implement said functionality with for instance your door bell. Because in my experience just watching the state of a relay through HomeKit from an ESP will only be correct if no auto toggle is being done with a delay.
Weird fact is still that home assistant reports it correctly. So wondering if maybe the delay is to short/fast for status values being passed through to HomeKit?
Could just be we found a limit in the HomeKit component… maybe worth pinging somebody with knowledge of that component to get some answers?