diff --git a/HMI/code_gen/icons/icons.py b/HMI/code_gen/icons/icons.py index 9cec3704..1af189ae 100644 --- a/HMI/code_gen/icons/icons.py +++ b/HMI/code_gen/icons/icons.py @@ -45,7 +45,8 @@ icons = [ "shield", "shield-lock", "shield-airplane", - "bell-ring" + "bell-ring", + "ray-vertex" ] diff --git a/HMI/icons.md b/HMI/icons.md index 9e6aacd3..9a8bae87 100644 --- a/HMI/icons.md +++ b/HMI/icons.md @@ -48,3 +48,4 @@ ID | MD Icon Name | Icon 41 | shield-lock | ![shield-lock](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-lock.svg) 42 | shield-airplane | ![shield-airplane](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-airplane.svg) 43 | bell-ring | ![bell-ring](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/bell-ring.svg) +44 | ray-vertex | ![ray-vertex](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/ray-vertex.svg) diff --git a/HMI/nspanel.HMI b/HMI/nspanel.HMI index 3d12baac..5518059f 100644 Binary files a/HMI/nspanel.HMI and b/HMI/nspanel.HMI differ diff --git a/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py b/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py index 2078fe69..cd1a9235 100644 --- a/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py +++ b/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py @@ -43,6 +43,7 @@ icons = { 'shield-lock': 41, 'shield-airplane': 42, 'bell-ring': 43, + 'ray-vertex': 44, } def get_icon_id(ma_name): diff --git a/apps/nspanel-lovelace-ui/luibackend/icons.py b/apps/nspanel-lovelace-ui/luibackend/icons.py index b2d90f45..b3ca88e8 100644 --- a/apps/nspanel-lovelace-ui/luibackend/icons.py +++ b/apps/nspanel-lovelace-ui/luibackend/icons.py @@ -41,6 +41,8 @@ def map_to_mdi_name(ha_type, state=None, device_class=None): return "palette" if ha_type == "switch": return "flash" + if ha_type == "number": + return "ray-vertex" if ha_type == "light": return "lightbulb" if ha_type == "input_boolean": diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 443e51e8..faf72045 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -156,7 +156,11 @@ class LuiPagesGen(object): icon_id = get_icon_id_ha("scene", overwrite=icon) text = get_translation(self._locale,"ACTIVATE") return f",button,{item},{icon_id},17299,{name},{text}" - + if item_type == "number": + icon_id = get_icon_id_ha("number", overwrite=icon) + min_v = entitiy.attributes.get("min", 0) + max_v = entitiy.attributes.get("max", 100) + return f",number,{item},{icon_id},17299,{name},{entity.state}|{min_v}|{max_v}" def generate_entities_page(self, heading, items): navigation = ""