I also wanted to try -> THIS INSTRUCTION <-, but this is not working for me.
What I’m doing wrong?
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
The result of the message is strange:
