Added dynamic icons lock, battery and window state (#45)

#43
This commit is contained in:
Linus Dietz
2023-07-01 15:06:23 +02:00
committed by GitHub
parent 8c0ce8976e
commit a1881a87d8
4 changed files with 80 additions and 4 deletions
+8
View File
@@ -11,6 +11,14 @@ from pathlib import Path
TZ = None
def get_icon_between(icon_list, state):
icon = None
for s in icon_list:
if s["to"] <= state <= s["from"]:
icon = s["icon"]
return icon
def setup_logging():
log_location = "volvo2mqtt.log"
if os.environ.get("IS_HA_ADDON"):