Toggle lights with right-hand buttons

This commit is contained in:
2024-05-16 15:59:48 +01:00
parent 8b9e232af9
commit 621a1d23d6
2 changed files with 17 additions and 2 deletions

3
api.py
View File

@@ -70,3 +70,6 @@ class Api:
else: dir = "down"
self.__post(f"/api/services/media_player/volume_{dir}", {"entity_id": entity_id})
self.__post(f"/api/services/media_player/volume_{dir}", {"entity_id": entity_id})
def toggleLight(self, entity_id: str) -> None:
self.__post(f"/api/services/light/toggle", {"entity_id": entity_id})