Merge pull request #47 from deejaybeam/dev

upd: states
This commit is contained in:
Chris
2022-11-22 15:00:31 +01:00
committed by GitHub

View File

@@ -117,8 +117,8 @@ blueprint:
- switch - switch
- input_boolean - input_boolean
heatingsystemflame: heatingsystemflame:
name: Top Menu 01 (Optional) name: Top Menu 04 (Optional)
description: '* *Top Menu 01 is a Flame icon. When your selected sensor is on, a flame icon is displayed*' description: '* *Top Menu 04 is a Flame icon. When your selected sensor is on, a flame icon is displayed*'
default: [] default: []
selector: selector:
entity: entity:
@@ -747,6 +747,8 @@ trigger_variables:
hotwatercharge: !input "hotwatercharge" hotwatercharge: !input "hotwatercharge"
heatingsystemflame: !input "heatingsystemflame" heatingsystemflame: !input "heatingsystemflame"
display_target_temperature: "sensor.{{ nspanel_name_trigger }}_display_target_temperature" display_target_temperature: "sensor.{{ nspanel_name_trigger }}_display_target_temperature"
relay01_entity: "switch.{{ nspanel_name_trigger }}_relay_1"
relay02_entity: "switch.{{ nspanel_name_trigger }}_relay_2"
##### WEATHER Trigger ##### ##### WEATHER Trigger #####
weather: !input "weather" weather: !input "weather"
@@ -810,10 +812,16 @@ variables:
battery_icon: "80" battery_icon: "80"
light_pic_off: "96" light_pic_off: "96"
light_pic_on: "97" light_pic_on: "97"
hotwater_pic_off: "60" # hotwater_pic_off: "60"
hotwater_pic_on: "61" hotwater_pic_on: "61"
flame_pic_on: "57" flame_pic_on: "57"
flame_pic_off: "60" # flame_pic_off: "60"
top_menu_blank: "60"
thermostat_pic_on: "58"
heat_pic_on: "59"
relay01_pic_on: "105"
relay02_pic_on: "106"
weather_sunny: "2" weather_sunny: "2"
weather_cloudy: "3" weather_cloudy: "3"
@@ -928,8 +936,6 @@ variables:
{%- endif -%} {%- endif -%}
##### FORCAST ACCUWEATHER - DAY 0 ##### ##### FORCAST ACCUWEATHER - DAY 0 #####
accuweather_realfeel_temperature_min_0d: "sensor.{{ accuweather }}_realfeel_temperature_min_0d" accuweather_realfeel_temperature_min_0d: "sensor.{{ accuweather }}_realfeel_temperature_min_0d"
accuweather_realfeel_temperature_max_0d: "sensor.{{ accuweather }}_realfeel_temperature_max_0d" accuweather_realfeel_temperature_max_0d: "sensor.{{ accuweather }}_realfeel_temperature_max_0d"
@@ -1128,6 +1134,20 @@ trigger:
entity_id: !input "heatingsystemflame" entity_id: !input "heatingsystemflame"
id: heatingsystemflame_state id: heatingsystemflame_state
##### Relay01 - Trigger "relay01_state" #####
- platform: event
event_type: state_changed
event_data:
entity_id: '{{ relay01_entity }}'
id: relay01_state
##### Relay02 - Trigger "relay02_state" #####
- platform: event
event_type: state_changed
event_data:
entity_id: '{{ relay02_entity }}'
id: relay02_state
##### Left Button - Trigger "left_button_press" ##### ##### Left Button - Trigger "left_button_press" #####
- platform: template - platform: template
value_template: '{{ states(left_button) is match "on" }}' value_template: '{{ states(left_button) is match "on" }}'
@@ -1490,10 +1510,10 @@ action:
######################################################################################################################## ########################################################################################################################
# main - alias: "choose alias (name) - NEW VERSION" # main - alias: "choose alias (name)"
- choose: - choose:
##### NSPanel boot init ##### DONE ##### NSPanel boot init #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: nspanel_boot_init id: nspanel_boot_init
@@ -1846,6 +1866,20 @@ action:
data: data:
cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} cmd: home.right_bt_pic.pic={{ right_hardware_button_state }}
###### SET Climate Symbol ######
- if:
- condition: template
value_template: '{{ climate |length > 0 }}'
then:
- variables:
top_menu_climate: >-
{%- if states(climate) == "heat" and state_attr(climate, "hvac_action") != None and state_attr(climate, "hvac_action") == "heating" -%} {{ heat_pic_on }}
{%- elif states(climate) == "heat" -%} {{ thermostat_pic_on }}
{%- else -%} {{ top_menu_blank }}
{%- endif -%}
- service: "{{ command_printf }}"
data:
cmd: home.icon_top_03.pic={{ top_menu_climate }}
##### NSPanel boot init finished ##### ##### NSPanel boot init finished #####
- delay: - delay:
@@ -1856,7 +1890,7 @@ action:
message: " " message: " "
#### TFT Upload Automation ##### DONE #### TFT Upload Automation #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: tft_upload id: tft_upload
@@ -1867,7 +1901,7 @@ action:
data: {} data: {}
##### Update Button Page and Lightsettings / Coversettings Page ##### DONE ##### Update Button Page and Lightsettings / Coversettings Page #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
@@ -2270,7 +2304,7 @@ action:
message: '0 %' message: '0 %'
##### Page Button - SHORT Press - Toggle Enities ##### DONE ##### Page Button - SHORT Press - Toggle Enities #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: short_press id: short_press
@@ -2325,7 +2359,7 @@ action:
entity_id: "{{ entity_short }}" entity_id: "{{ entity_short }}"
##### Page Button - LONG Press - JUMP to Page Lightsettings / Coversettings ##### DONE ##### Page Button - LONG Press - JUMP to Page Lightsettings / Coversettings #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: long_press id: long_press
@@ -2504,7 +2538,7 @@ action:
cmd: coversettings.cover_status.pic={{ cover_pic_closed }} cmd: coversettings.cover_status.pic={{ cover_pic_closed }}
##### LASTCLICK_LIGHTSETTINGS - Changes on page Light-Settings ##### DONE ##### LASTCLICK_LIGHTSETTINGS - Changes on page Light-Settings #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: light_settings id: light_settings
@@ -2574,7 +2608,7 @@ action:
cmd: "{{ entity_back }}" cmd: "{{ entity_back }}"
##### LASTCLICK_COVERSETTINGS - Changes on page Cover-Settings ##### DONE ##### LASTCLICK_COVERSETTINGS - Changes on page Cover-Settings #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: cover_settings id: cover_settings
@@ -2639,7 +2673,7 @@ action:
cmd: "{{ entity_back }}" cmd: "{{ entity_back }}"
##### LASTCLICK_CLIMATESETTINGS - Changes on page Climate-Settings ##### DONE ##### LASTCLICK_CLIMATESETTINGS - Changes on page Climate-Settings #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: climate_settings id: climate_settings
@@ -2791,7 +2825,7 @@ action:
temperature: "{{ new_setpoint }}" temperature: "{{ new_setpoint }}"
##### Left button press ##### DONE ##### Left button press #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: left_button_press id: left_button_press
@@ -2812,7 +2846,7 @@ action:
milliseconds: "{{ delay_value }}" milliseconds: "{{ delay_value }}"
##### Left button State ##### DONE ##### Left button State #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: left_button_state id: left_button_state
@@ -2832,7 +2866,7 @@ action:
cmd: home.left_bt_pic.pic={{ left_hardware_button_state }} cmd: home.left_bt_pic.pic={{ left_hardware_button_state }}
##### Right button press ##### DONE ##### Right button press #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: right_button_press id: right_button_press
@@ -2851,7 +2885,7 @@ action:
entity_id: "{{ right_button_entity }}" entity_id: "{{ right_button_entity }}"
##### Right button State ##### DONE ##### Right button State #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: right_button_state id: right_button_state
@@ -2871,7 +2905,7 @@ action:
cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} cmd: home.right_bt_pic.pic={{ right_hardware_button_state }}
##### Date and Time Home Page ##### DONE ##### Date and Time Home Page #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: time_state id: time_state
@@ -2889,7 +2923,7 @@ action:
message: "{{ date01_mui }}" message: "{{ date01_mui }}"
##### Humidity ##### DONE ##### Humidity #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: humidity_state id: humidity_state
@@ -2900,7 +2934,7 @@ action:
message: "{{ trigger.event.data.new_state.state |round(0) }}%" message: "{{ trigger.event.data.new_state.state |round(0) }}%"
##### Hotwater Temp ##### DONE ##### Hotwater Temp #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: hotwatertemp_state id: hotwatertemp_state
@@ -2922,7 +2956,7 @@ action:
cmd: home.hotwater_pic.pic={{ hotwater_pic_on }} cmd: home.hotwater_pic.pic={{ hotwater_pic_on }}
##### Outdoor Temp Entity ##### DONE ##### Outdoor Temp Entity #####
- conditions: - conditions:
- condition: trigger - condition: trigger
id: outdoortemp_state id: outdoortemp_state
@@ -4345,7 +4379,7 @@ action:
{%- endif -%} {%- endif -%}
heating_state: >- heating_state: >-
{%- if hvac_mode == "off" -%} {{ off_mui }} {%- if hvac_mode == "off" -%} {{ off_mui }}
{%- elif hvac_mode != "off" -%} {{ heat_mui }} {%- elif hvac_mode != "off" -%} {{ on_mui }}
{%- endif -%} {%- endif -%}
- service: "{{ command_text_printf }}" - service: "{{ command_text_printf }}"
@@ -4468,11 +4502,41 @@ action:
- variables: - variables:
flame_pic: >- flame_pic: >-
{%- if trigger.event.data.new_state.state == 'on' -%} {{ flame_pic_on }} {%- if trigger.event.data.new_state.state == 'on' -%} {{ flame_pic_on }}
{%- else -%} {{ flame_pic_off }} {%- else -%} {{ top_menu_blank }}
{%- endif -%} {%- endif -%}
- service: "{{ command_printf }}" - service: "{{ command_printf }}"
data: data:
cmd: home.icon_top_01.pic={{ flame_pic }} cmd: home.icon_top_04.pic={{ flame_pic }}
##### Set Relay01-Symbol #####
- conditions:
- condition: trigger
id: relay01_state
sequence:
- variables:
relay01_pic: >-
{%- if trigger.event.data.new_state.state == 'on' -%} {{ relay01_pic_on }}
{%- else -%} {{ top_menu_blank }}
{%- endif -%}
- service: "{{ command_printf }}"
data:
cmd: home.icon_top_01.pic={{ relay01_pic }}
##### Set Relay02-Symbol #####
- conditions:
- condition: trigger
id: relay02_state
sequence:
- variables:
relay02_pic: >-
{%- if trigger.event.data.new_state.state == 'on' -%} {{ relay02_pic_on }}
{%- else -%} {{ top_menu_blank }}
{%- endif -%}
- service: "{{ command_printf }}"
data:
cmd: home.icon_top_02.pic={{ relay02_pic }}
##### Sync Hotwater Charge button-symbol ##### ##### Sync Hotwater Charge button-symbol #####
@@ -4496,50 +4560,65 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: climate_state id: climate_state
- condition: template # - condition: template
value_template: '{{ states(current_page) == page_climate }}' # value_template: '{{ states(current_page) == page_climate }}'
# - condition: template # - condition: template
# value_template: '{{ climate_optimistic == false }}' # value_template: '{{ climate_optimistic == false }}'
sequence: sequence:
- variables: - choose:
heating_state: >- ### current page is climate ###
{%- if trigger.event.data.new_state.state == "off" -%} {{ off_mui }} - conditions: '{{ states(current_page) == page_climate }}'
{%- elif trigger.event.data.new_state.state != "off" -%} {{ heat_mui }} sequence:
{%- endif -%} - variables:
heating_bt_pic: >- heating_state: >-
{%- if trigger.event.data.new_state.state == "off" -%} {{ heating_bt_pic_off }} {%- if trigger.event.data.new_state.state == "off" -%} {{ off_mui }}
{%- else -%} {{ heating_bt_pic_on }} {%- elif trigger.event.data.new_state.state != "off" -%} {{ on_mui }}
{%- endif -%} {%- endif -%}
- service: "{{ command_text_printf }}" heating_bt_pic: >-
data: {%- if trigger.event.data.new_state.state == "off" -%} {{ heating_bt_pic_off }}
component: current_temp {%- else -%} {{ heating_bt_pic_on }}
message: "{{ trigger.event.data.new_state.attributes.current_temperature | round(1)}}°" {%- endif -%}
- service: "{{ command_text_printf }}"
data:
component: heating_state
message: "{{heating_state}}"
- service: "{{ command_printf }}"
data:
cmd: heating_bt_pic.pic={{ heating_bt_pic }}
- if:
- condition: template
value_template: '{{ trigger.event.data.new_state.state != "off" }}'
then:
- service: "{{ command_thermostat_cycle }}"
data:
value: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}"
else:
- service: "{{ command_thermostat_cycle }}"
data:
value: "0"
- service: "{{ command_text_printf }}"
data:
component: target_temp
message: " "
- service: "{{ command_text_printf }}"
data:
component: current_temp
message: "{{ trigger.event.data.new_state.attributes.current_temperature | round(1)}}°"
- service: "{{ command_text_printf }}"
data:
component: heating_state
message: "{{heating_state}}"
- service: "{{ command_printf }}"
data:
cmd: heating_bt_pic.pic={{ heating_bt_pic }}
- if:
- condition: template
value_template: '{{ trigger.event.data.new_state.state != "off" }}'
then:
- service: "{{ command_thermostat_cycle }}"
data:
value: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}"
else:
- service: "{{ command_thermostat_cycle }}"
data:
value: "0"
- service: "{{ command_text_printf }}"
data:
component: target_temp
message: " "
### current page is home ###
- conditions: '{{ states(current_page) == page_home }}'
sequence:
- variables:
top_menu_climate: >-
{%- if trigger.event.data.new_state.state == "heat" and trigger.event.data.new_state.attributes.hvac_action is defined and trigger.event.data.new_state.attributes.hvac_action == "heating" -%} {{ heat_pic_on }}
{%- elif trigger.event.data.new_state.state == "heat" -%} {{ thermostat_pic_on }}
{%- else -%} {{ top_menu_blank }}
{%- endif -%}
- service: "{{ command_printf }}"
data:
cmd: home.icon_top_03.pic={{ top_menu_climate }}
############################################################# #############################################################