From 81933548c6c19e802bf4feb33d263b257a0c10d4 Mon Sep 17 00:00:00 2001 From: jbouwh Date: Fri, 8 Sep 2023 16:31:48 +0000 Subject: [PATCH] Log entitty ID when instead of name --- homeassistant/components/mqtt/binary_sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/mqtt/binary_sensor.py b/homeassistant/components/mqtt/binary_sensor.py index b5c7bc987896f4..a1341350a7a4e7 100644 --- a/homeassistant/components/mqtt/binary_sensor.py +++ b/homeassistant/components/mqtt/binary_sensor.py @@ -215,7 +215,7 @@ def state_message_received(msg: ReceiveMessage) -> None: "Empty template output for entity: %s with state topic: %s." " Payload: '%s', with value template '%s'" ), - self._config[CONF_NAME], + self.entity_id, self._config[CONF_STATE_TOPIC], msg.payload, self._config.get(CONF_VALUE_TEMPLATE), @@ -240,7 +240,7 @@ def state_message_received(msg: ReceiveMessage) -> None: "No matching payload found for entity: %s with state topic: %s." " Payload: '%s'%s" ), - self._config[CONF_NAME], + self.entity_id, self._config[CONF_STATE_TOPIC], msg.payload, template_info,