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:
Erik Montnemery 2021-10-28 08:13:32 +02:00 committed by GitHub
parent 11cb04822e
commit 0456a896e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 207 additions and 211 deletions

View file

@ -231,7 +231,7 @@ class MqttNumber(MqttEntity, NumberEntity, RestoreEntity):
self._current_number = current_number
self.async_write_ha_state()
mqtt.async_publish(
await mqtt.async_publish(
self.hass,
self._config[CONF_COMMAND_TOPIC],
current_number,