Fix mqtt not publishing null payload payload to remove discovery (#118261)

This commit is contained in:
Jan Bouwhuis
2024-05-28 00:53:22 +02:00
committed by GitHub
parent 6067ea2454
commit bfc3194661
8 changed files with 47 additions and 27 deletions

View File

@@ -148,7 +148,7 @@ async def async_publish(
)
mqtt_data = hass.data[DATA_MQTT]
outgoing_payload = payload
if not isinstance(payload, bytes):
if not isinstance(payload, bytes) and payload is not None:
if not encoding:
_LOGGER.error(
(