diff --git a/HMI/README.md b/HMI/README.md index 50ade45b..d8aba57b 100644 --- a/HMI/README.md +++ b/HMI/README.md @@ -162,6 +162,9 @@ ID | Icon 2 | ![thermometer](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/thermometer.svg) 3 | ![gesture-tap-button](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/gesture-tap-button.svg) 4 | ![flash](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/flash.svg) +5 | ![music](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/music.svg) +6 | ![check-circle-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/check-circle-outline.svg) +7 | ![close-circle-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/close-circle-outline.svg) # Design Guidelines for Nextion HMI Project diff --git a/HMI/nspanel.HMI b/HMI/nspanel.HMI index b0c745ef..a235851f 100644 Binary files a/HMI/nspanel.HMI and b/HMI/nspanel.HMI differ diff --git a/HMI/nspanel.tft b/HMI/nspanel.tft index 5a61896b..e8e57605 100644 Binary files a/HMI/nspanel.tft and b/HMI/nspanel.tft differ diff --git a/appdaemon/apps/nspanel.py b/appdaemon/apps/nspanel.py index c05a1cdd..d5788f8d 100644 --- a/appdaemon/apps/nspanel.py +++ b/appdaemon/apps/nspanel.py @@ -208,9 +208,15 @@ class NsPanelLovelanceUI: switch_val = 1 if entity.state == "on" else 0 return "entityUpd,{0},{1},{2},{3},{4},{5}".format(item_nr, item_type, item, 1, name, switch_val) - if item_type == "switch": + if item_type == "switch" or item_type == "input_boolean": switch_val = 1 if entity.state == "on" else 0 - return "entityUpd,{0},{1},{2},{3},{4},{5}".format(item_nr, item_type, item, 4, name, switch_val) + icon_id = 4 + if item_type == "input_boolean" and switch_val == 1: + icon_id = 6 + else: + icon_id = 7 + + return "entityUpd,{0},{1},{2},{3},{4},{5}".format(item_nr, "switch", item, icon_id, name, switch_val) if item_type == "sensor": icon_id = 0