I had the same thing following the .85 upgrade. The above change worked for me, but now I get all the states in the json string, rather than simply the one specified in the value_template. Not an issue, just shows them all (~16).
To get the attributes I simple copied the state_topic to the json_attributes_topic.
But as mentioned before this will show all of the attributes, which is not as smart as before (picking the right ones).
I wonder if an issue should be created to keep also the old configuration style because it is smarter for setups where you cannot change MQTT message payloads.
I’m receviing the configuration variable "json_attributes" is deprecated, replace with "json_attributes_topic" error in my logs but for the life of me I can’t find any references to json_attributes anywhere in my config files.
Is there something hidden I should be looking at?
I used zigbee2mqtt amongst other things such as MQTT sensor templates. Below is a snippet from one of my MQTT sensors, would that cause any issues?
I have the same issue as apt… I use zigbee2mqtt. I originally had it all set up pairing devices through that component and then managed to break it all. All the data files were still in tact but I was trying to rebuild the MQTT integration (under config). I ended up deleting it and Hassio ‘auto discovered’ my old config and it started working again. Below is the integration (apt: it is under configuration -> integrations).
Interestingly, I do have the same number of json_attributes errors as I have sensors under that integration, but I can’t find the text “json_attributes” anywhere in my files either.
Do you know where the files may have been stored? I checked the /share/zigbee2mqtt files.
Have you updated the zigbee2mqtt component under the Hass.io menu? It should be version 1.1.1, which made the error go away for me. I didn’t have to change any of my code.
Having manually configured all my YAML to use to new json_attributes_topic I am still getting warnings in the HA log about /mqtt/sensor.py and using json_attributes
I am running 1.1.1 and 0.87.0
Someone suggested maybe auto discovered devices? I have a bunch I don’t use that I manually added and HA added as well (I’d love to get rid of them)
@stratplayer I was having these error messages as well, turned out I had retained messages from old devices in my mqtt database. Check this out: https://github.com/Koenkk/zigbee2mqtt/issues/713
It mentions hass.io but that’s besides the issue. I have a separate mqtt container so i just removed my mosquitto.db. If you’re using the HA integrated mqtt you should see if you can clear the retained messages as mentioned in the url i mentioned.
Good luck.
edit:
I think I had json_attributes in “homeassistant/light/+/+/config” and “homeassistant/sensor/+/+/config”. be sure to check out both.