Merge pull request #79 from Blackymas/dev

bug fixes
This commit is contained in:
Blackymas
2022-12-06 08:54:20 +01:00
committed by GitHub
3 changed files with 61 additions and 31 deletions

View File

@@ -1,5 +1,7 @@
# NSPanel Custom with HA Blueprint
[![Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspnael_blueprint.yaml)
[![Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspanel_blueprint.yaml)
This project allows you to configure your complete NSPanel via a Blueprint with UI.
### *That means you don't have to customize any code or change any lines in the code.*
@@ -11,10 +13,13 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
📕 Full documentation and installation is available here [NSPanel Configuration, Setup and HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki).
🚀 How to create "Issues" when I have a problem [WIKI HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/Welcome-to-the-NSPanel_HA_Blueprint-WIKI).
🚀 How to create "Issues" when I have a problem [WIKI HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/Welcome-to-the-NSPanel_HA_Blueprint-WIKI)
Version v2.0.0
⭐ All Feature Requests can be found here [All Feature Request](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/new%20feature%20request)
🎉 Roadmap Roadmap can be found here [Roadmap](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap)
🙋 WE ARE LOOKING FOR YOU! _**We are always looking for people who would like to support this project. We are looking for help with "programming new features, writing documentation or translating documentation to EN. If you are interested then please contact us :)**_
## NSPanel:
![2 Home](https://user-images.githubusercontent.com/41958506/203653897-cf96a7af-2b92-4ad9-a375-987decad5aa7.png)
@@ -161,3 +166,4 @@ Marcfager: https://github.com/marcfager/nspanel-mf
lovejoy77: https://github.com/lovejoy777/NSpanel
Hellis81: https://github.com/Hellis81/NS-panel

View File

@@ -11,8 +11,10 @@
# ## usage of secrets-file ## -> comment in ###### Change ME ######
# device_name: "nspanel-name" # Wird im Blueprint benötigt!
# wifi_ssid: !secret nspanel_wifi_ssid # add in your esphome secrets file.
# wifi_password: !secret nspanel_wifi_password # add in your esphome secrets file.
# ota_password: !secret nspanel_ota_password # add in your esphome secrets file.
# wifi_password: !secret nspanel_wifi_password # add in your esphome secrets file. -> per default this is also used for ota_password and web_password
# ota_password: !secret nspanel_ota_password # add in your esphome secrets file. - manual change in code required to activate
# web_password: !secret nspanel_web_password # add in your esphome secrets file. - manual change in code required to activate
# api_password: !secret nspanel_api_password # add in your esphome secrets file. - manual change in code required to activate
# nextion_update_url: !secret nspanel_update_url # add in your esphome secrets file. Example: "http://"HOME ASSISTANT IP":8123/local/nspanel/nspanel.tft"
# ## static ip config ##
@@ -22,6 +24,11 @@
# dns: "10.0.0.138"
# domain: ".local"
##### if you rename this file to .nspanel_esphome.yaml then you can activate nested config
##### use the ADVANCED CONFIG-Section as device configuration
##### https://esphome.io/guides/configuration-types.html#yaml-insertion-operator
# <<: !include .nspanel_esphome.yaml
##### END OF ADVANCED CONFIGURATION ##############################################################
##### WIFI SETUP #####
@@ -36,7 +43,7 @@ wifi:
# subnet: ${subnet}
# dns1: ${dns}
# domain: ${domain}
# Enable fallback hotspot (captive portal) in case wifi connection fails
##### Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${device_name}"
password: ${wifi_password}
@@ -62,11 +69,15 @@ web_server:
port: 80
auth:
username: admin
password: ${ota_password}
password: ${wifi_password}
##### advanced config - change to use web_password #####
# password: ${web_password}
##### OTA PASSWORD #####
ota:
password: ${ota_password}
password: ${wifi_password}
##### advanced config - change to use ota_password #####
# password: ${ota_password}
safe_mode: true
reboot_timeout: 3min
num_attempts: 3
@@ -105,6 +116,8 @@ button:
##### START - API CONFIGURATION #####
api:
##### advanced config - activate to use api_password #####
# password: ${api_password}
services:
##### SERVICE TO UPDATE THE HMI FILE #####

View File

@@ -1757,12 +1757,16 @@ action:
message: "{{ time }}"
##### NSPanel boot init - Humidity #####
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_text_printf }}"
data:
component: home.humidity_state
message: "{{ states(humidity) |round(0) }}%"
- if:
- condition: template
value_template: '{{ humidity is match "sensor." and states(humidity).state != "unavailable" }}'
then:
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_text_printf }}"
data:
component: home.humidity_state
message: "{{ states(humidity) |round(0) }}%"
##### NSPanel boot init - Hotwater #####
- if:
@@ -1784,9 +1788,10 @@ action:
##### NSPanel boot init - Outdoor Temp #####
- variables:
outdoor_temp: >-
{%- if outdoortemp is match "sensor." -%} {{ states(outdoortemp) |round(0) }}
{%- elif weather == "Default" -%} {{state_attr(ha_weather,"temperature") | round(0)}}
{%- elif weather == "AccuWeather" -%} {{state_attr(accuweather_value,"temperature") | round(0)}}
{%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }}
{%- elif weather == "Default" and state_attr(ha_weather, "temperature") != None -%} {{state_attr(ha_weather,"temperature") | round(0)}}
{%- elif weather == "AccuWeather" and state_attr(accuweather_value, "temperature") != None -%} {{state_attr(accuweather_value,"temperature") | round(0)}}
{%- else -%} 0
{%- endif -%}
- delay:
milliseconds: "{{ delay_value }}"
@@ -3094,17 +3099,21 @@ action:
message: "{{ time }}"
##### NSPanel Humidity #####
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_text_printf }}"
data:
component: home.humidity_state
message: "{{ states(humidity) |round(0) }}%"
- if:
- condition: template
value_template: '{{ humidity is match "sensor." and states(humidity).state != "unavailable" }}'
then:
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_text_printf }}"
data:
component: home.humidity_state
message: "{{ states(humidity) |round(0) }}%"
##### NSPanel Hotwater #####
- if:
- condition: template
value_template: '{{ hotwatertemp is match "sensor." }}'
value_template: '{{ hotwatertemp is match "sensor." and states(hotwatertemp).state != "unavailable" }}'
then:
- delay:
milliseconds: "{{ delay_value }}"
@@ -3121,9 +3130,10 @@ action:
##### NSPanel Outdoor Temp #####
- variables:
outdoor_temp: >-
{%- if outdoortemp is match "sensor." -%} {{ states(outdoortemp) |round(0) }}
{%- elif weather == "Default" -%} {{state_attr(ha_weather,"temperature") | round(0)}}
{%- elif weather == "AccuWeather" -%} {{state_attr(accuweather_value,"temperature") | round(0)}}
{%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }}
{%- elif weather == "Default" and state_attr(ha_weather, "temperature") != None -%} {{state_attr(ha_weather,"temperature") | round(0)}}
{%- elif weather == "AccuWeather" and state_attr(accuweather_value, "temperature") != None -%} {{state_attr(accuweather_value,"temperature") | round(0)}}
{%- else -%} 0
{%- endif -%}
- delay:
milliseconds: "{{ delay_value }}"
@@ -4461,9 +4471,10 @@ action:
- variables:
hvac_mode: "{{ states(climate) }}"
outdoor_temp: >-
{%- if outdoortemp is match "sensor." -%} {{ states(outdoortemp) |round(0) }}
{%- elif weather == "Default" -%} {{state_attr(ha_weather,"temperature") | round(0)}}
{%- elif weather == "AccuWeather" -%} {{state_attr(accuweather_value,"temperature") | round(0)}}
{%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }}
{%- elif weather == "Default" and state_attr(ha_weather, "temperature") != None -%} {{state_attr(ha_weather,"temperature") | round(0)}}
{%- elif weather == "AccuWeather" and state_attr(accuweather_value, "temperature") != None -%} {{state_attr(accuweather_value,"temperature") | round(0)}}
{%- else -%} 0
{%- endif -%}
heating_state: >-
{%- if hvac_mode == "off" -%} {{ off_mui }}