core: 2022.2.4 MQTT Sensor Platform Broken

The problem

errors setting up MQTT Sensors

What version of Home Assistant Core has the issue?

2022.2.4

What was the last working version of Home Assistant Core?

2022.2.3

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

sensor.mqtt

Link to integration documentation on our website

https://www.home-assistant.io/integrations/sensor.mqtt/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sensor
Source: components/mqtt/debug_info.py:53
Integration: Sensor (documentation, issues)
First occurred: 10:51:37 AM (25 occurrences)
Last logged: 10:51:37 AM

Error adding entities for domain sensor with platform mqtt
Error while setting up mqtt platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 778, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/sensor.py", line 168, in async_added_to_hass
    await super().async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 658, in async_added_to_hass
    await self._subscribe_topics()
  File "/usr/src/homeassistant/homeassistant/components/mqtt/sensor.py", line 310, in _subscribe_topics
    self._sub_state = await subscription.async_subscribe_topics(
  File "/usr/src/homeassistant/homeassistant/components/mqtt/subscription.py", line 94, in async_subscribe_topics
    await requested.resubscribe_if_necessary(hass, current)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/subscription.py", line 47, in resubscribe_if_necessary
    debug_info.add_subscription(self.hass, self.message_callback, self.topic)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 53, in add_subscription
    debug_info = hass.data[DATA_MQTT_DEBUG_INFO]
KeyError: 'mqtt_debug_info'


### Additional information

_No response_

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 33
  • Comments: 20 (5 by maintainers)

Most upvoted comments

â„šī¸ The issue has been fixed, we are working on getting .5 shipped.

Please bear with us for a bit 🙏

Thanks. Pulled the .4 release. Will do better with .5

No worries, just thought it worth mentioning to setup a procedure to rollback on dockerhub when a release is broken 😃

We have. Ship a fix.