Skip to content

Automation is not triggered when its own state changes to 'on' #99732

Description

@dgtal1

The problem

I've created an automation, which I want to be running in a loop and it has to be triggered once it's enabled in the UI, or after HA started. So in both cases when its state changes to on.

There is a weird behaviour currently. Right after I click the 'Enable' button in the UI Automation Editor - it shows as triggered:
image

but there is nothing about being triggered in traces (when I report this it's SEPT 6th):
image

also the entity view shows it as not triggered by this automation change state action:
image

and something about being triggered in the entity history:
image

State attribute says it's not being executed:
image

Some elements show it was triggered, but it wasn't really executed
When I trigger it manually - it works fine, but I can't get it triggered by its status change as per the automation config.

Looks like Automations cannot fully react on its own state changes. At least not on the change to on.

What version of Home Assistant Core has the issue?

core-2023.8.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Automation

Link to integration documentation on our website

https://www.home-assistant.io/integrations/automation

Diagnostics information

No response

Example YAML snippet

I'm pasting my automation YAML source until the actions section, as I think only the trigger section is relevant here and besides my automation is really big (many IFs, ELSE etc):

alias: "[DOGRZEWACZ] Automatyka sterownika grzałki"
description: Sterowanie sterownikiem grzałki w oparciu o przełączniki trybów w HA
trigger:
  - platform: state
    entity_id:
      - automation.dogrzewacz_automatyka_sterownika_grzalki
    to: "on"
condition: []
action:
  - variables:
      min_temp: "22.0"
  - repeat:
      while: []
      sequence:

Anything in the logs that might be useful for us?

No error in the logs

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions