HASS.Agent do not change sensors/commands if config is set during host downtime
Admittedly a very silly bug, but a bug nonetheless
Replication:
- Disconnect from network
- Change sensors/commands
- Send and activate sensors/commands within disconnection grace period
- Reconnect the network
Expected:
- Sensor is deleted from MQTT
Actual:
- Sensor is frozen in place, not even reported as unavailable
In the case of adding sensor, just clicking send and activate again when the mqtt host is up will work
In the case of removing sensor, you need to add the sensor back and then remove it again
6 Replies
Help us Help Others!
To help others find answers, you can mark your question as solved via
Right click solution message -> Apps -> ✅ Mark Solution
Help us Help You!
Please don't delete messages or posts because it makes it impossible to understand what happened. If you don't want your messages to be seen then don't post here.
Please provide us with the version number of your client.
You can find it in the HA device info page after 'Firmware'.Make sure to provide detailed reports of bugs.
Please include error log uploads and info about the bug.
@Amadeo
Hmm, interesting case
Restarting hass.agent after reconnecting will for sure add new sensors but won't remove old ones.
I'll give it more thought but the only reliable way is to either cache the removal messages or prevent editing sensors/commands when not connected
can it poll/query from the mqtt for it's own signature/sensors/commands/whatever you call it, and then delete it accordingly that way?
we don't keep an "overview" to say of all sensors/commands - that's because they are retained on the mqtt broker side
either way this would be a nice feature to have