mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-30 11:24:20 +01:00
revert to if else syntax, to keep compatibility with python 3.9
This commit is contained in:
@@ -31,13 +31,12 @@ class NsPanelLovelaceUIManager(hass.Hass):
|
||||
version = "v3.7.0"
|
||||
|
||||
model = cfg.get("model")
|
||||
match model:
|
||||
case "us-l":
|
||||
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-l-{version}.tft"
|
||||
case "us-p":
|
||||
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-p-{version}.tft"
|
||||
case _:
|
||||
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft"
|
||||
if model == "us-l":
|
||||
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-l-{version}.tft"
|
||||
elif model == "us-p":
|
||||
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-p-{version}.tft"
|
||||
else:
|
||||
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft"
|
||||
desired_tasmota_driver_url = "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be"
|
||||
|
||||
mode = cfg.get("updateMode")
|
||||
|
||||
Reference in New Issue
Block a user