I have some configurations set up in Zigbee2MQTT to omit several attributes that I don’t care about from publishing via the filtered_attributes
config in Zigbee2MQTT. However, it seems that despite the attributes no longer appearing in the mqtt payload, HA still keeps re-creating them and subsequently setting them to unknown
state (and throwing warnings in the HA logs).
Is there a way to actually prevent these sensors from continually being recreated in HA if they are no longer being published by Zigbee2MQTT? I already tried removing all references to the specific sensor entities in the entity registry, etc.
Also, I know I can just disable them in HA, but I would prefer to not have them exist at all (as I sometimes do need to go through disabled entities, and it winds up adding roughly 100 extra items that I’d prefer to just completely ignore).
They might be residuals from initial birth
message.
Home assistant keeps them in the memory as these sensors are created in sticky format.
You can remove one device from z2m and add it back with a fresh name and validate if it is the case
Just tested a brand new device and it still adds sensors for the filtered_attributes
. I started by shutting down Home Assistant to be totally sure that no messages from z2m would start populating anything on the HA side. Once HA was completely shut down, I added a brand new, never before paired device and added some values to the filtered_attributes
list. I then confirmed that the mqtt payload didn’t contain any of the filtered attributes. After that, I started HA back up and it added the new device, but regrettably still added sensors for the omitted attributes.
Thanks very much for the original suggestion as well as the heads up on the feature request (I guess I’m in the same boat as some others now with TONS of moderately useless sensors showing up )