mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-24 00:14:26 +01:00
Update controller.py
This commit is contained in:
@@ -177,7 +177,10 @@ class LuiController(object):
|
||||
if button_type == "media-back":
|
||||
self._ha_api.get_entity(entity_id).call_service("media_previous_track")
|
||||
if button_type == "media-pause":
|
||||
self._ha_api.get_entity(entity_id).call_service("media_play_pause")
|
||||
player = self._ha_api.get_entity(entity_id)
|
||||
if player.state == "off":
|
||||
player.call_service("turn_on")
|
||||
player.call_service("media_play_pause")
|
||||
if button_type == "volumeSlider":
|
||||
pos = int(value)
|
||||
# HA wants this value between 0 and 1 as float
|
||||
|
||||
Reference in New Issue
Block a user