Devices becomes unavailable in HA but everything works in zigbee2mqtt itself.
All zigbee devices in HA are discovered automatically. I had no reason to modify configuration or something in config.
There are no “value_template” in any config related to mqtt or zigbee configuration
First failed device config seems looks good in zigbee2mqtt devices.yaml
Once I fixed by hand using MQTT explorer by replacing value_template to state_value_template in homeassistant/light/{device}/config topic
But after some restarts devices again started become unavailable. And NOT all together at once, but after each HA restart I see more and more devices unavailable. And “value_template” again apears in those light topics somehow.
I suspecting that somehow mqtt (local HA mosquito addon) is messing with me and reposting some old retained messages. I am not sure what to blame and how to find root couse.
Can anyone help to solve this mystery?
Home Assistant 2023.1.6
Supervisor 2022.12.1
Operating System 9.4
Frontend 20230110.0
HA is running in Qnap NAS VM
Moquito and Z2M addons are Latest. Currently no updates available to those.
and mqtt has single manual device in HA configuration.yaml no additional mqtt configuration exists in HA configuration folder. Mosquito is setup from GUI
I removed all retained messages that has “value_template”. Updated HA and z2m today to latest versions, rebooted VM where HA mqtt and z2m is running. And again mqtt was flooded with the same messages. I dont know, the last option I see is to install new separate mqtt server and redirect to it, witch I dont want to do becouse to much work reconfigure everyting. Any more suggestions?
on light devices in devices.yaml as old one visible in previous post I added value_template: null and dicovery payload become as expected (without value_template)
strange that z2m cannot update devices itself and fix it, when it is known that it breaks HA and remove this frustration from user. I expected that updating z2m would fix it. so maybe its “by design” or somehow failed to update properly
was issue that those lights somehow got new ids in HA and I missed that thinking that it is not discovered due to discovery errors. There I have no explanation and whos foult it is.
for example : light.office_light changed to light.officelight
But now everything managed. just only 2 days of pain!