Initial state

I have a simple automation that has it’s initial state set to false to prevent it from triggering when Hass starts, but the initial_state doesn’t seem to work (hass 0.40.1) and the automation is enabled when hass starts. What am i doing wrong??

- alias: Alert on public IP change
  initial_state: False
  trigger:
    - platform: state
      entity_id: sensor.myipopendnscom
  action:
    - service: persistent_notification.create
      data:
        message: "The public IP address changed."
        title: "IP address changed"

I haven’t tried this technique, but I’m wondering if the issue is that you’re trying to set the state to “false”. Automations have a state of “on” or “off”. Does setting initial_state to “off” fix the issue?

tried both but to no avail unfortunately

For what it is worth, I have used that technique to disable an automation and it works for me. The following are the first few lines of one automation that I have used. When I restart HA, the status of this automation is “off”.

- alias: Turn on Living Room Lights in morning
  initial_state: False
  hide_entity: True
  trigger:
    platform: time
    after: "06:30:00"

Do you need a trigger state?

  trigger:
    - platform: state
      entity_id: sensor.myipopendnscom
      to: 'True'

Problem solved after adding hide_entity to the automation. While it has nothing to do with initial_state it does have some kind of dependency so it seems :thinking:

Thanks jcroed for pointing me in the right direction