forked from home-assistant/core
Fix last_reset_topic
config replaces state_topic
for sensor platform (#53677)
This commit is contained in:
@@ -196,7 +196,7 @@ class MqttSensor(MqttEntity, SensorEntity):
|
|||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
if CONF_LAST_RESET_TOPIC in self._config:
|
if CONF_LAST_RESET_TOPIC in self._config:
|
||||||
topics["state_topic"] = {
|
topics["last_reset_topic"] = {
|
||||||
"topic": self._config[CONF_LAST_RESET_TOPIC],
|
"topic": self._config[CONF_LAST_RESET_TOPIC],
|
||||||
"msg_callback": last_reset_message_received,
|
"msg_callback": last_reset_message_received,
|
||||||
"qos": self._config[CONF_QOS],
|
"qos": self._config[CONF_QOS],
|
||||||
|
Reference in New Issue
Block a user