Removed a satellite sensor, but still shows up in HA
Hi! I encountered a (potential) issue.
I created a satellite sensor, but decided to remove it because of a name change. But after that it still shows up in HA, with status unknown, while being gone in the configuration.
16 Replies
I checked the config file, and it only shows the one I want there to be. So thats kinda weird
Which leads me to believe it isn't the hass.agent itself. But I can't think of what it might be otherwise
Also, important to know; it does still go to unavailable when closing the Satellite service, and goes to unkown once the service started on my pc.
So somehow there is still a connection
this might be some stale retained mqtt message
do you have mqtt explorer by any chance?
I do not unfortunately. I run my MQTT server in docker
I can try to download it
But would it in that case also go from unavailable to unkown or the other way around when I start the hass.agent/satellite agent?
it is using the same "availability" topic as rest of the sensors/commands
so probably yes
if you can, please, will be easier to fix if that's the issue
Yeah it shows up there as well
only the bottom one ('lastsystemstatechange') is still visible in the agent
So if I want to remove that one that shouldnt be there I should just click the trashbin icon?
yup
even if you remove something else, upon HASS.Agent's restart it'll resend the messages
Great man! Thanks
Works like a charm
Just out of curiousity; is it maybe that the agent's empty payload to remove that sensor didn't send properly, or wasn't properly received?
hass.agent will try to remove the previous retained message before publishing a new one when you edit via the UI, if the change was done manually in the config or the config was copy/pasted from backup the messages will still be there
if you edited via UI
then it's potential bug report but then we need to find a way to replicate it 😄
Yeah I eddited via the UI, but Migrated from the older version to this fork. So I guess thats what happened
As far as I remember it went like this:
Migrated the data to this version of the agent > removed the sensor, which was of the previous version > created the new one.
Result:
New one did register, but the old one remained in Home Assistant/the mqtt network
Yeah it wasnt solved unfortunately. Clearing it via the explorer only worked temporarily
hm
is the original satellite service still running by any chance?
its not. I removed all files from the previous version from my system to make sure its none of that
that is interesting and confusing, you don't have it in the configuration so from where it comes from
how long did it took to reappear?