mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-23 13:02:14 +01:00
add feature flag for new sliders
This commit is contained in:
@@ -126,6 +126,7 @@ class LuiBackendConfig(object):
|
|||||||
'sleepBrightness': 20,
|
'sleepBrightness': 20,
|
||||||
'screenBrightness': 100,
|
'screenBrightness': 100,
|
||||||
'defaultBackgroundColor': "ha-dark",
|
'defaultBackgroundColor': "ha-dark",
|
||||||
|
'featureExperimentalSliders': False,
|
||||||
'sleepTracking': None,
|
'sleepTracking': None,
|
||||||
'sleepTrackingZones': ["not_home", "off"],
|
'sleepTrackingZones': ["not_home", "off"],
|
||||||
'sleepOverride': None,
|
'sleepOverride': None,
|
||||||
|
|||||||
@@ -85,7 +85,11 @@ class LuiController(object):
|
|||||||
elif type(defaultBackgroundColor) is list:
|
elif type(defaultBackgroundColor) is list:
|
||||||
dbc = rgb_dec565(defaultBackgroundColor)
|
dbc = rgb_dec565(defaultBackgroundColor)
|
||||||
|
|
||||||
self._send_mqtt_msg(f"dimmode~{sleepBrightness}~{brightness}~{dbc}")
|
featureExperimentalSliders=0
|
||||||
|
if self._config.get("featureExperimentalSliders"):
|
||||||
|
featureExperimentalSliders=1
|
||||||
|
|
||||||
|
self._send_mqtt_msg(f"dimmode~{sleepBrightness}~{brightness}~{dbc}~~{featureExperimentalSliders}")
|
||||||
|
|
||||||
def calc_current_brightness(self, sleep_brightness_config):
|
def calc_current_brightness(self, sleep_brightness_config):
|
||||||
current_screensaver_brightness = 20
|
current_screensaver_brightness = 20
|
||||||
|
|||||||
Reference in New Issue
Block a user