Light and wall switch works with HomeKit. I wish the light change from on to off when the light is on, and change from off to on when the light is off, each time I press the wall switch button.
I tried shortcuts in homekit
if the light is on
turn off the light
else turn on the light
but is too laggy (2 seconds)
Is there any chance i can get this though home assistant and works in homekit?
You can listen for an HomeKit event, when you know the event for pressing this button you can use it as an event trigger in your automation. This will probably be a bit faster.
I can’t speak for the lag. There could be different issues.
As for the toggle, you can do as Joram says. You can find an example in the docs: HomeKit - Home Assistant. Use the event listener under the developer tools to get more info for what to trigger on.