mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix key error MQTT binary_sensor when no name is set (#99943)
Log entitty ID when instead of name
This commit is contained in:
parent
f1bae7d37b
commit
06109d22fd
@ -215,7 +215,7 @@ class MqttBinarySensor(MqttEntity, BinarySensorEntity, RestoreEntity):
|
|||||||
"Empty template output for entity: %s with state topic: %s."
|
"Empty template output for entity: %s with state topic: %s."
|
||||||
" Payload: '%s', with value template '%s'"
|
" Payload: '%s', with value template '%s'"
|
||||||
),
|
),
|
||||||
self._config[CONF_NAME],
|
self.entity_id,
|
||||||
self._config[CONF_STATE_TOPIC],
|
self._config[CONF_STATE_TOPIC],
|
||||||
msg.payload,
|
msg.payload,
|
||||||
self._config.get(CONF_VALUE_TEMPLATE),
|
self._config.get(CONF_VALUE_TEMPLATE),
|
||||||
@ -240,7 +240,7 @@ class MqttBinarySensor(MqttEntity, BinarySensorEntity, RestoreEntity):
|
|||||||
"No matching payload found for entity: %s with state topic: %s."
|
"No matching payload found for entity: %s with state topic: %s."
|
||||||
" Payload: '%s'%s"
|
" Payload: '%s'%s"
|
||||||
),
|
),
|
||||||
self._config[CONF_NAME],
|
self.entity_id,
|
||||||
self._config[CONF_STATE_TOPIC],
|
self._config[CONF_STATE_TOPIC],
|
||||||
msg.payload,
|
msg.payload,
|
||||||
template_info,
|
template_info,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user