Automation keeps triggering

I am running HA 0.35.2, built with the AIO, just rebuilt today.

I took a look at the log book and I see this event triggering every minute, even though nothing has changed.

# Turns on Christmas Tree lights
- alias: 'Christmas Tree on'
  trigger:
  - platform: state
    entity_id: 'sun.sun'
    state: 'above_horizon'
  - platform: state
    entity_id: 'group.tracked'
    state: 'home'
  - platform: state
    entity_id: 'group.tree'
    state: 'off'
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: 'group.tracked'
        state: 'home'
      - condition: state
        entity_id: 'input_boolean.holiday_mode'
        state: 'on'
  action:
    service: homeassistant.turn_on
    entity_id: group.tree

I don’t think you want the sate of group.tree to be a trigger for an action that changes the state of group.tree.

I think you can drop that third trigger, unless I’m reading this wrong.

You might consider some "from:"s in the triggers as well. That way, you’ll capture when state moves from one state to another.

You are right, the third trigger was excessive, but I added it in an attempt to cut down on the logging.

I have added transitions as shown below, but that doesn’t seem to help.

# Turns on Christmas Tree lights
- alias: 'Christmas Tree on'
  trigger:
  - platform: state
    entity_id: 'sun.sun'
    state: 'above_horizon'
  - platform: state
    entity_id: 'group.tracked'
    from: 'not_home'
    to: 'home'
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: 'group.tracked'
        state: 'home'
      - condition: state
        entity_id: 'input_boolean.holiday_mode'
        state: 'on'
  action:
    service: homeassistant.turn_on
    entity_id: group.tree

I don’t quote any of my entity_id’s. Is that an OK syntax? Probably is - just checking.

Have you tried using just one trigger or the other to see if you can track down which is the “noisy” one?

When you look at the states dev tab, what’re you seeing for the “last_triggered” value - is that updating every minute as well?

Good point… Not quite sure where I got that from.