inital support for alternating icons

This commit is contained in:
Johannes Braun
2022-03-22 19:00:22 +01:00
parent 3ed71d725d
commit 0629f70d30
7 changed files with 96 additions and 56 deletions

View File

@@ -39,7 +39,8 @@ icons = [
"battery-medium",
"shield-home",
"door-open",
"door-closed"
"door-closed",
"window-closed"
]
@@ -65,7 +66,7 @@ for icon_name in icons:
icon_name_list.append(icon_name)
# write mapping lib for python
with open(os.path.join(__location__, "../../../apps/nspanel-lovelace-ui", "icon_mapper.py"), 'w') as f:
with open(os.path.join(__location__, "../../../apps/nspanel-lovelace-ui", "icon_mapping.py"), 'w') as f:
f.write("icons = {\n")
for idx, val in enumerate(icon_name_list):
f.write(f" '{val}': {idx},\n")

View File

@@ -42,3 +42,4 @@ ID | MD Icon Name | Icon
35 | shield-home | ![shield-home](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-home.svg)
36 | door-open | ![door-open](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/door-open.svg)
37 | door-closed | ![door-closed](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/door-closed.svg)
38 | window-closed | ![window-closed](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/window-closed.svg)

Binary file not shown.

Binary file not shown.