Toggle lights with right-hand buttons
This commit is contained in:
3
api.py
3
api.py
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user