mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-27 18:04:24 +01:00
added light toggle to buttonpress
This commit is contained in:
@@ -218,6 +218,8 @@ class NsPanelLovelaceUI:
|
||||
if(btype == "button"):
|
||||
if(entity_id.startswith('scene')):
|
||||
self.api.get_entity(entity_id).call_service("turn_on")
|
||||
if(entity_id.startswith('light') or entity_id.startswith('switch')):
|
||||
self.api.get_entity(entity_id).call_service("toggle")
|
||||
else:
|
||||
self.api.get_entity(entity_id).call_service("press")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user