Spacer
1
Hello,
I am quite new to HA and need some help.
I want to create some kind of sensor from an external IP (IPv4) address.
To get the IP, I have a simple shell script, which I can execute in HA and which returns the desired IP address.
Thanks in advance
Jan
1 Like
SJ20035
2
Since it is a shell script you can use the command_line integration.
sensor:
- platform: command_line
name: External IP Address
command: "curl -s https://api.ipify.org"
scan_interval: 300
unique_id: external_ip_address
1 Like
tom_l
3
If you just want to get your public IP address use this with the default configuration values:
1 Like
AaronCake
(Aaron Cake)
4
Can also pull it via SNMP from your router, if your router supports that.