DNS IP sensor name shenanigans

I’ve been having some issues with my ISP lately and there have been quite a few public IP changes as my router fails over to the backup cellular modem and back again.

I’ve set up an automated message from the DNS IP sensor to monitor this.

According to the component docs:

This sensor should default to myip.opendns.com if no hostname is provided. So I did not provide one and the sensor name was sensor.myip

Then the notifications stopped happening and I found the sensor name had changed to sensor.myipopendnscom so I changed my notification to reflect this and things were monitored well again.

For a while.

Now the sensor name has changed back to sensor.myip

What the heck is going on?

Will it help if I set the hostname to explicity to myip.opendns.com ?

Should I trigger on both sensor names in case it changes again?

EDIT: Actually here’s the problem part of the docs. What happens if there’s no hostname provided (default myip.opendns.com)? Which does it use?

name ( Optional ): Name of the sensor. Defaults to myip or hostname without dots if specified.

Im hoping if I explicitly set the hostname to myip.opendns.com I’ll consistently get the second option.

Not sure where the problem comes from. Do you use the name paramter you have mentioned? It probably should override the automatically generated entity id.

Not Initially. I just had the platform and accepted the defaults for the other configuration variables. Now I have:

- platform: dnsip
  hostname: myip.opendns.com
  name: myip

With that the entity id should continue to be sensor.myip and you can work with that. However there might be an issue with the automatic entity naming if it does change without modifying the configuration.

Yeah so far it is sensor.myip.