diff --git a/homeassistant/components/mqtt/infrared.py b/homeassistant/components/mqtt/infrared.py index dd620bf2d3a4..f686f63b10c9 100644 --- a/homeassistant/components/mqtt/infrared.py +++ b/homeassistant/components/mqtt/infrared.py @@ -220,7 +220,7 @@ class MqttInfraredReceiverEntity(MqttEntity, InfraredReceiverEntity): _LOGGER.debug("Ignoring retained infrared signal on topic %s", msg.topic) return payload = self._value_template(msg.payload) - if not payload or payload in (PAYLOAD_NONE, "null"): + if not payload or payload in (PAYLOAD_NONE, "null", '""'): _LOGGER.debug( "Ignoring payload for %s on topic %s, with template %s", self.entity_id, diff --git a/tests/components/mqtt/test_infrared.py b/tests/components/mqtt/test_infrared.py index 3b98f78d3493..7e51fe380225 100644 --- a/tests/components/mqtt/test_infrared.py +++ b/tests/components/mqtt/test_infrared.py @@ -183,6 +183,12 @@ async def test_receiving_command_success_using_value_template( logging.DEBUG, False, ), + ( + '""', + "Ignoring payload for infrared.test on topic test-topic, with template None", + logging.DEBUG, + False, + ), ( "None", "Ignoring payload for infrared.test on topic test-topic, with template None",