So today one of my lights (switch) turned on from an automation that calls service switch.turn_off
The switch is an mqtt switch, homeassistant docker 0.115.2
Is this something for a github issue or how do I debug this? Seems kind of strange that it is even possible.
Thanks. I’m “glad” to hear I’m not the only one and that it’s not a problem with my devices/firmware if it happens with ESPHome too.
Maybe I should open an issue on github since on the forum nobody seems to care/notice.
I agree that opening an issue sounds like a good idea. Let me know if you need anymore info from me. I am fairly new to Home Assistant so not sure how much help I can be.
@tmaults if you can reproduce the issue, it would be good to get the same information from you too, the automation that triggers it and debug log messages:
@kevinkk525, I was able to recreate the issue by adding the automation shown below and after verifying that the “switch.power_controller_switch” was turned off, trigger the automation by changing the state of “input_boolean.helper_test” the “switch.power_controller_switch” was turned on as shown in the log snippet below.
Let me know if you need any more info.
from automations.yaml
id: ‘1604578529672’
alias: Test service.turn_on/turn_off
description: ‘’
trigger:
platform: state
entity_id: input_boolean.helper_test
condition: []
action:
service: switch.turn_off
data: {}
entity_id: switch.power_controller_switch
mode: single
I know it’s a years old thread, but it was a high-up result in Google when I was searching for my issue so i thought i’d post what I found here.
So, my issue was that every day at 11:56PM, my smart plug would turn off. HA listed it in the Logbook just as “Dishwasher turned off triggered by service Switch: Turn off”, but nothing more. After following the advice on the linked GitHub Issue, I enabled debug logging for core and mqtt by adding
logger:
default: info
logs:
homeassistant.core: debug
homeassistant.components.mqtt: debug
to my configuration.yaml file. Then I waited. Took a while to read the logs, but then I saw
Turns out, I had an old Alexa routine setup to run at 11:56PM and turn off the plugs I used for my Christmas lights. After Christmas, I unplugged those plugs and put them in the draw. 8 months later I took it out to use it for something else and forgot it’s original purpose! Routine is now disabled.