The states change doesn't trigger

All my triggers like this, doesn’t fire after update to 0.89.2

  • alias xxxx
    trigger:
    platform: state
    entity_id: light.tv_hattervilagitas
    from: ‘off’
    to: ‘on’
    action:

    States change from ‘on’ to ‘off’ also not operates!
    Have anybody some intention for me?
    Kovaccsaba

First thing to check: ensure the automation is on. Open the States page, find the automation in the list and confirm its state is on.

All automation status is off. But nonetheless they work except for this kind of state change:
domains: light, switch, input_boolean.

May be this is the cause?

Automation initial state

When you create a new automation, it will be disabled (and therefore won’t trigger) unless you explicitly add initial_state: true to it or turn it on manually via UI/another automation/developer tools.

The automations don’t work because … they’re off.

No. It’s not the cause it’s one possible solution … and not a necessary one.

The cause is a change, made several versions ago, to how states are stored so they can be restored after Home Assistant restarts. One consequence of this change was that, after performing the upgrade, all automations are set to off. To fix it, just turn them back on.

Here’s the new behavior as a result of the change:
When you restart Home Assistant any automations you turned on will be restored to on. Any automations you turned off will be restored to off. It remembers the last state of the automation and restores it.

If you don’t like this new behavior and always want an automation to be on when Home Assistant restarts (even if you had set it to off), then add initial_state: true to the automation’s configuration.

Yes! I added to all 148! :slight_smile:
Thank you for your time.

Kovaccsaba

Like I said, it wasn’t necessary to do that.

All you needed to do was this:

  1. Go to the Services page
  2. Select the service automation.turn_on
  3. Enter this into Services Data { "entity_id": "all" }
  4. Click the CALL SERVICE button.

Done! All 148 automations are now turned on.

What you did (adding initial_state: true to all 148 automations) means you’ll never be able to shut off an automation without it coming back on after a restart. But if that’s what you want, then fine.

Many thans to this tutorial. Unfortunately I have done the edit before.
But very usefull for the future!

Thanks 123!

Yes, I don’t have the automation I need to turn off .