mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Fix last_reset_topic
config replaces state_topic
for sensor platform (#53677)
This commit is contained in:
parent
c6213b36ad
commit
fb3b8b6686
@ -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],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user