added code for us auto update

This commit is contained in:
Johannes
2022-03-30 11:02:43 +02:00
committed by GitHub
parent f1c382e028
commit 7056ed0dff
2 changed files with 18 additions and 1 deletions

View File

@@ -100,6 +100,8 @@ class LuiBackendConfig(object):
'panelRecvTopic': "tele/tasmota_your_mqtt_topic/RESULT",
'panelSendTopic': "cmnd/tasmota_your_mqtt_topic/CustomSend",
'updateMode': "auto-notify",
'model': "eu",
'orientation': "landscape",
'timeoutScreensaver': 20,
'brightnessScreensaver': 20,
'brightnessScreensaverTracking': None,

View File

@@ -65,7 +65,22 @@ class NsPanelLovelaceUIManager(hass.Hass):
controller = LuiController(self, cfg, send_mqtt_msg)
desired_display_firmware_version = 22
desired_display_firmware_url = "http://nspanel.pky.eu/lovelace-ui/github/nspanel-v2.0.0.tft"
version = "v2.0.0"
model = cfg.get("model")
orientation = cfg.get("orientation")
if model == "us":
if orientation == "landscape":
# us landscape version
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-l-{version}.tft"
else:
# us portrait version
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-p-{version}.tft"
else:
# eu version
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft"
desired_tasmota_driver_version = 3
desired_tasmota_driver_url = "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be"