I have been wondering about my computer that I usually keep in sleep mode during nights, but when I wake up, my computer is on. This has happened several times already, also during daytime, at random times. Also, my other switches seem to turn on and off as a group at random times every now and then.
I decided to investigate about this, and found out that it’s Home Assistant that actually wakes up my computer (I have a switch that sends WOL command to my computer when I manually turn it on and it works). So I enabled Logger and wanted to see what actually happens at that exact time when History tab shows that this “wake up computer” -switch has turned on. This morning this has happened at 5:29 apparently. Oh, and before I went to bed, I had all my Sonoff switches on, but they all were switched off from 0:00 onwards (I only have one day visible on History panel so I am not sure at which time they have turned off, but I think the reason is the same why my computer is suddenly turning on. Anyway, these are the lines in home-assistant.log at 5:29:
2018-05-01 05:28:52 INFO (MainThread) [homeassistant.components.http.view] Serving /api/ to 172.30.32.2 (auth: True)
2018-05-01 05:29:01 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.time, old_state=<state sensor.time=05:28; friendly_name=Time, icon=mdi:clock, hidden=True @ 2018-05-01T05:28:01.506269+03:00>, new_state=<state sensor.time=05:29; friendly_name=Time, icon=mdi:clock, hidden=True @ 2018-05-01T05:29:01.506010+03:00>>
2018-05-01 05:29:20 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=switch.computer_wakeup, old_state=<state switch.computer_wakeup=off; friendly_name=Wake The Computer @ 2018-05-01T00:34:10.532845+03:00>, new_state=<state switch.computer_wakeup=on; friendly_name=Wake The Computer @ 2018-05-01T05:29:20.533173+03:00>>
2018-05-01 05:29:20 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=group.all_switches, old_state=<state group.all_switches=off; entity_id=('switch.switch', 'switch.switch_8', 'switch.switch_6', 'switch.switch_9', 'switch.sonoff_pow_cellar', 'switch.sonoff_pow_pump', 'switch.sonoff_th16_cellar', 'switch.sonoff_th16_pump', 'switch.computer_wakeup'), order=3, auto=True, friendly_name=all switches, hidden=True @ 2018-05-01T00:34:10.570000+03:00>, new_state=<state group.all_switches=on; entity_id=('switch.switch', 'switch.switch_8', 'switch.switch_6', 'switch.switch_9', 'switch.sonoff_pow_cellar', 'switch.sonoff_pow_pump', 'switch.sonoff_th16_cellar', 'switch.sonoff_th16_pump', 'switch.computer_wakeup'), order=3, auto=True, friendly_name=all switches, hidden=True @ 2018-05-01T05:29:20.548326+03:00>>
Okay, on 4th line there is this event change for entity “group.all_switches”. And before that on line 3, there is my computer wake-up call. But what exactly triggers those events, how can I find out (I am using hass.io)? And why this group.all_switches is even triggering as I haven’t mentioned it even once in my configuration?
And I don’t tend to sleepwalk