mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-24 08:24:25 +01:00
Update controller.py
This commit is contained in:
@@ -327,8 +327,8 @@ class LuiController(object):
|
||||
else:
|
||||
apis.ha_api.get_entity(entity_id).call_service("turn_off")
|
||||
if button_type == "media-shuffle":
|
||||
cur_suffle = apis.ha_api.get_entity(entity_id).shuffle
|
||||
apis.ha_api.get_entity(entity_id).call_service("shuffle_set", shuffle=!cur_suffle)
|
||||
suffle = not apis.ha_api.get_entity(entity_id).shuffle
|
||||
apis.ha_api.get_entity(entity_id).call_service("shuffle_set", shuffle=suffle)
|
||||
if button_type == "volumeSlider":
|
||||
pos = int(value)
|
||||
# HA wants this value between 0 and 1 as float
|
||||
@@ -401,4 +401,4 @@ class LuiController(object):
|
||||
entity = apis.ha_api.get_entity(entity_id)
|
||||
option = entity.attributes.effect_list[int(value)]
|
||||
entity.call_service("select_effect", option=option)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user