From fb3b8b66862cfc4462d1cd084e85f5aa666deecc Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Thu, 29 Jul 2021 21:09:14 +0200 Subject: [PATCH] Fix `last_reset_topic` config replaces `state_topic` for sensor platform (#53677) --- homeassistant/components/mqtt/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/mqtt/sensor.py b/homeassistant/components/mqtt/sensor.py index 0c234fbbbea..239af7b450a 100644 --- a/homeassistant/components/mqtt/sensor.py +++ b/homeassistant/components/mqtt/sensor.py @@ -196,7 +196,7 @@ class MqttSensor(MqttEntity, SensorEntity): self.async_write_ha_state() if CONF_LAST_RESET_TOPIC in self._config: - topics["state_topic"] = { + topics["last_reset_topic"] = { "topic": self._config[CONF_LAST_RESET_TOPIC], "msg_callback": last_reset_message_received, "qos": self._config[CONF_QOS],