I have Sonoff TH, it used to have 1 AM2302 sensor, now it has two so the name of the first sensor changed (“am2301” -> “am2301_1”) and now HA considers “am2301” gone and I see constant exceptions in the journalctl:
Jun 09 11:29:42 aikhass hass[6607]: 2020-06-09 11:29:42 ERROR (MainThread) [homeassistant.util.logging] Exception in message_received when handling msg on 'tele/tasmota_81ED08/SENSOR': '{"Time":"2020-06-09T02:29:42","AM2301-01":{"Temperature":22.4,"Humidity":33.2,"DewPoint":5.4},"AM2301-03":{"Temperature":19.1,"Humidity":17.5,"DewPoint":-6.2},"TempUnit":"C"}'
Jun 09 11:29:42 aikhass hass[6607]: Traceback (most recent call last):
Jun 09 11:29:42 aikhass hass[6607]: File "/home/aik/homeassistant/lib/python3.8/site-packages/homeassistant/components/mqtt/debug_info.py", line 34, in wrapper
Jun 09 11:29:42 aikhass hass[6607]: _log_message(msg)
Jun 09 11:29:42 aikhass hass[6607]: File "/home/aik/homeassistant/lib/python3.8/site-packages/homeassistant/components/mqtt/debug_info.py", line 24, in _log_message
Jun 09 11:29:42 aikhass hass[6607]: messages = debug_info["entities"][entity_id]["subscriptions"][
Jun 09 11:29:42 aikhass hass[6607]: KeyError: 'sensor.tempmaster_am2301_humidity'
How do I stop these exceptions? Googling suggests manual editing of various files in .homeassistant which seems overkill.
Still having the problem. With most sensors I can run MQTT-Explorer and remove those from mosquitto and things are fine but some sensors are just stuck - they do not appear anywhere in the HA UI but I keep getting
I think I’m also seeing similar issue with one of my tasmota-tuya converted lights. I have several that are fine, but one shows the same Exception error in HA Log and points to this non-existent entity:
KeyError: ‘light.bathroom_tasmota’
Is it not ok to rename entities in HA if they are discovered using auto-discovery?
I did not use auto-discovery really at all until I started using tasmota.
Is there some “cached” entity names that may need a refresh?
–Doug
Thank you for the suggestion, I tend to not restart HA as much these days now that you can reload scripts and automations.
Seems to have stopped the error for now. I like the autodiscovery, just need to get used to it! Thanks again!
–Doug