sensor:
- platform: dnsip
group: External IP: - sensor.dnsip
automation: alias: Notify when external ip changes initial_state: on trigger: platform: state entity_id: sensor.dnsip action: service: notify.YOU data_template: message: "New external IP address is {{ states('sensor.dnsip') }}"
Here you go.
Source: https://community.home-assistant.io/t/display-public-ip-notify-of-change/74655