DNS-IP Automation does not trigger

Hello everybody,

I’ve tried to make HA notify me when my external IP changes. The actions work: when I launch the script I get an eMail with correct actual IP:

alias: Notify when external IP changes
description: Automation to send notification when external IP changed
trigger:
  - platform: state
    entity_id: sensor.myip
condition:
  - condition: template
    value_template: "\"{{ trigger.to_state.state != 'None' }}\""
action:
  - service: notify.mobile_app_huhuuu
    data:
      title: Your External IP address has changed
      message: Your new IP address is {{ states.sensor.myip.state }}
  - service: notify.email_notifier
    data:
      target:
        - [email protected]
      title: Your External IP address has changed
      message: Your new IP address is {{ states.sensor.myip.state }}
mode: single

Only thing is: the triggers does not launch the actions… :frowning: What am I missing here?

Any help would be kindly appreciated!

Thank you,

Kay

What are these backslashes in your value_template for? Shouldn’t it be just:

condition:
  - condition: template
    value_template: "{{ trigger.to_state.state != 'None' }}"