Avoid service call in MQTT async_publish function (#58441)
* Avoid service call in MQTT async_publish function * Tweak * Fix integrations + tests
This commit is contained in:
parent
11cb04822e
commit
0456a896e3
26 changed files with 207 additions and 211 deletions
|
@ -621,7 +621,7 @@ class MqttLightJson(MqttEntity, LightEntity, RestoreEntity):
|
|||
self._white_value = kwargs[ATTR_WHITE_VALUE]
|
||||
should_update = True
|
||||
|
||||
mqtt.async_publish(
|
||||
await mqtt.async_publish(
|
||||
self.hass,
|
||||
self._topic[CONF_COMMAND_TOPIC],
|
||||
json.dumps(message),
|
||||
|
@ -646,7 +646,7 @@ class MqttLightJson(MqttEntity, LightEntity, RestoreEntity):
|
|||
|
||||
self._set_flash_and_transition(message, **kwargs)
|
||||
|
||||
mqtt.async_publish(
|
||||
await mqtt.async_publish(
|
||||
self.hass,
|
||||
self._topic[CONF_COMMAND_TOPIC],
|
||||
json.dumps(message),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue