From time to time I have Z-Wave and WiFi smart switches that will turn on for no reason. Last night was a good example. While sleeping, my living room GE Enbrighten Z-Wave Plus light switch turned on for no reason. When I checked the device events for that switch, it had an entry for 11:40 PM, which stated that the device was turned on "digitally". When I checked the past logs, it only says the same thing. How do I find out what triggered the switch to turn on digitally? There are many things that could have caused it, such as a rule, Alexa integration, manually using a dashboard tile. It would be nice if I could pinpoint why these switches are turning on randomly without my intervention. Is there a more detailed level of logging that I can enable to find that information out? Thanks.
2022-07-19 11:40:58.035 pm [info](http://IP REMOVED/device/edit/101)2nd - Lights - Living Room (C7) was turned on [digital]
As @marktheknife suggests Alexa Hunches is definitely a possibility and comes up quite often. Other than than you can go to the device page itself and see what applications are using the device. It won't tell you which one may have turned it on or off but it's a place to start. If you then turn on detailed logging for each of those it may give you an indication the next time it happens.
Being able to have a "stack" trace on events would be cool but I'd worry about overhead also it looks like debug logging availability is up to the app/device maintainer. You could request that feature and see how the devs respond.
Thanks for the tip! I have never heard of that feature, but it is on by default. I did not have any hunches setup though, and Alexa did not ask me in the middle of the night whether or not I wanted to turn the living room light on, so I'm not sure that was the culprit. I turned that feature off in the Alexa app.