What’s the best way that people have found to get their public IP address into Home Assistant? It’d be useful to run an automation to send a notification when it changes.
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
The “DNS IP” integration will give you your public IP address.
Maybe not the best way, but I set up a Node RED work flow to query the API at ip.me every few minutes for my v4 and v6 addresses, and update sensors in HA.