Some correction… The version with ‘dnsip’ is working. And I receive notification…
The previous version - still something wrong. No notifications send.
This one is no good:
alias: Send iPhone notification when external IP changed
description: Automation to send notification to iPhone when external IP changed
trigger:
- platform: state
entity_id: sensor.external_ip
condition:
- condition: template
value_template: >-
{% if trigger.from_state.state and trigger.to_state.state %} true {% else %} false {%
endif %}
- condition: template
value_template: >-
{% if trigger.from_state.state == 'unknown' %} false {% else %} true {%
endif %}
- condition: template
value_template: >-
{% if trigger.to_state.state == 'unknown' %} false {% else %} true {%
endif %}
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
action:
- service: notify.mobile_app_dpiphone8
data:
title: Your External IP address has changed
message: >-
Your External IP changed from {{ 'trigger.from_state.state' }} to {{
'trigger.to_state.state' }}
mode: single