Compare commits

...

2 Commits

Author SHA1 Message Date
Johannes
6ccc8af2fa add state to icon overwrite for light 2022-06-13 12:14:58 +02:00
Johannes
7f4a50f8c8 Update prepare_nspanel.md 2022-06-12 18:49:15 +02:00
2 changed files with 5 additions and 1 deletions

View File

@@ -222,7 +222,7 @@ class LuiPagesGen(object):
if entityType in "light": if entityType in "light":
switch_val = 1 if entity.state == "on" else 0 switch_val = 1 if entity.state == "on" else 0
icon_color = self.get_entity_color(entity, overwrite=colorOverride) icon_color = self.get_entity_color(entity, overwrite=colorOverride)
icon_id = get_icon_id_ha("light", overwrite=icon) icon_id = get_icon_id_ha("light", state=entity.state, overwrite=icon)
return f"~{entityType}~{entityId}~{icon_id}~{icon_color}~{name}~{switch_val}" return f"~{entityType}~{entityId}~{icon_id}~{icon_color}~{name}~{switch_val}"
if entityType in ["switch", "input_boolean", "automation"]: if entityType in ["switch", "input_boolean", "automation"]:
switch_val = 1 if entity.state == "on" else 0 switch_val = 1 if entity.state == "on" else 0

View File

@@ -6,6 +6,10 @@ You can use the Tasmota Web Installer to do so. [Tasmota Web Installer](https://
Checkout Blakadders Template Repo for more information on flashing, do not use the autoexec.be from this page. Checkout Blakadders Template Repo for more information on flashing, do not use the autoexec.be from this page.
[NSPanel Page of the Tasmota Template Repository](https://templates.blakadder.com/sonoff_NSPanel.html) [NSPanel Page of the Tasmota Template Repository](https://templates.blakadder.com/sonoff_NSPanel.html)
If you prefer EspHome over Tasmota, you can use this thrid party esphome component, which is replacing tasmota and the berry driver of this project.
[ESPHome component](https://github.com/sairon/esphome-nspanel-lovelace-ui)
## Configure Tasmota Template for NSPanel ## Configure Tasmota Template for NSPanel
Configure the NSPanel template for Tasmota. (Go to Configuration and Configure Other and paste the template there, make sure to tick the activate checkbox) Configure the NSPanel template for Tasmota. (Go to Configuration and Configure Other and paste the template there, make sure to tick the activate checkbox)