async states

This commit is contained in:
Devmel Apps
2023-08-04 16:41:19 +02:00
parent bb072fd573
commit 055cf05b48
7 changed files with 51 additions and 35 deletions
+1 -1
View File
@@ -72,5 +72,5 @@ class AirSendButton(ButtonEntity):
def press(self, **kwargs: Any) -> None:
"""Handle the button press."""
note = {"method": 1, "type": 0, "value": "TOGGLE"}
if self._device.transfer(note):
if self._device.transfer(note, self.entity_id) == True:
self.schedule_update_ha_state()