Lights turn on without obvious trigger

I have a Shelly double relay that is recognized by HA. One of the two lights randomly turn on. I have checked and double checked and there is no automation, script, or blueprint that is associated with it. When I look at the activity log of this device is see the following:

“Back Lights turned on triggered by action Home Assistant Core Integration: Generic turn on”

Does anyone have any ideas?

You have an automation (or, more likely, a blueprint) which uses homeassistant.turn_on (or homeassistant.toggle).

Find the automation which is using it and check the targets. Most probably the affected light has an area or label which is being targeted in the automation.

I found this markdown card somewhere. It lists the ended automations.

type: markdown
content: |-
  |D|H|M||Name|
  |----:|----:|----:|:--:|:----|
  {% for state in states.automation
     |selectattr('attributes.last_triggered', 'defined')
     |selectattr('attributes.last_triggered')
     |sort(attribute='attributes.last_triggered', reverse=true) -%}
    {%- set t = now() - state.attributes.last_triggered -%}
    {%- set days = t.days if t.days > 0 else ' ' -%}
    {%- set hrs = t.seconds//3600 %}
    {%- set hrs = hrs if hrs > 0 else ' ' -%}
    |{{days}}|{{hrs}}|{{(t.seconds//60)%60}}||_{{state.name}}_|
  {% endfor %}
title: Ended Automations

The automations page also shows when each automation was triggered last and can be sorted by that time.

2 Likes