I have an MQTT switch that I use to trigger a light toggle event…but the problem is when the event triggers HASS seems to trigger the automation 2 times - BUT only when the light is already on. So the light is on, then I click the switch and the light toggles off… 1s passes and the lights goes back on. The mqtt broker only sees the event 1 time. When the light is already off, it turns on properly. Its really strange. Its almost as if 2 automations exist with the same name (but there isnt… I checked)
Is it possible that the trigger topic has different payloads on click and release?
Maybe try the payload option for the trigger.
But this will not explain why it works if the light is off.
I just tried… didnt change anything… And what is strange that i should have posted is that it only seems to happen 1 time per ~5-10s. What I mean is when the bulb is on, I press the switch and it turns off, waits ~1s, turns on. Then I press the trigger again and it turns off properly and stays off.
Thanks. Yes, awesome call with trying to do it through the Services pane. I get the exact same result. I dont know why I didnt test that earlier… BUT I realized that I also get the same reaction by calling light.turn_on and then light.turn_off. SO it must be an issue w/ esphome on this bulb and the logger mis-attributing the event - or rather trying to over-compensate. ANYWAYS, I have had a number of issues w/ esphome - including crashes on these Globe bulbs. i think I will end up having to move them to Tasmota