Fix last_reset_topic config replaces state_topic for sensor platform (#53677)

This commit is contained in:
Maciej Bieniek 2021-07-29 21:09:14 +02:00 committed by GitHub
parent c6213b36ad
commit fb3b8b6686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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],