Update BETA_blueprint.yaml
This commit is contained in:
@@ -22,6 +22,11 @@ blueprint:
|
||||
default: /config/www/nspanel/buero/nspanel_buero.tft
|
||||
selector:
|
||||
text: {}
|
||||
# nextion_inited:
|
||||
# name: NSPanel "Nextion Switch - nextion_inited"
|
||||
# description: 'nextion_inited is set up via esphome and shows the state of the Nspanel - NSPanel ready after Reboot (same NSPanel as **"last click"**) Example *"switch.nspanel_buero_nextion_inited"*'
|
||||
# selector:
|
||||
# entity: {}
|
||||
weather:
|
||||
name: Weather Integration (coming soon)
|
||||
description: select our Weather Integration
|
||||
@@ -36,11 +41,6 @@ blueprint:
|
||||
default: []
|
||||
selector:
|
||||
text: {}
|
||||
nextion_inited:
|
||||
name: NSPanel "Nextion Switch - nextion_inited"
|
||||
description: 'nextion_inited is set up via esphome and shows the state of the Nspanel - NSPanel ready after Reboot (same NSPanel as **"last click"**) Example *"switch.nspanel_buero_nextion_inited"*'
|
||||
selector:
|
||||
entity: {}
|
||||
outdoortemp:
|
||||
name: Outdoor Temperature Sensor (Optional)
|
||||
description: select the Temperature Sensor. If no outdoor sensor available write "default" or "accuweather" to use the outdoor temperature of the selected Weather Integration. This value is displayed on the Home Page an Thermostat Page
|
||||
@@ -252,7 +252,7 @@ blueprint:
|
||||
- light
|
||||
- switch
|
||||
- cover
|
||||
- input_boolean
|
||||
- input_rightoolean
|
||||
entity10_name:
|
||||
name: Name "Button 10" (Optional)
|
||||
description: Button label - 10 characters are supported
|
||||
@@ -657,10 +657,13 @@ max: 5000
|
||||
#
|
||||
#########################################
|
||||
trigger_variables:
|
||||
nspanel_trigger: !input "nspanel_name"
|
||||
last_click: "sensor.{{ nspanel_trigger }}_last_click"
|
||||
last_click_lightsettings: "sensor.{{ nspanel_trigger }}_last_click_lightsettings"
|
||||
last_click_coversettings: "sensor.{{ nspanel_trigger }}_last_click_coversettings"
|
||||
nspanel_name_trigger: !input "nspanel_name"
|
||||
last_click: "sensor.{{ nspanel_name_trigger }}_last_click"
|
||||
last_click_lightsettings: "sensor.{{ nspanel_name_trigger }}_last_click_lightsettings"
|
||||
last_click_coversettings: "sensor.{{ nspanel_name_trigger }}_last_click_coversettings"
|
||||
left_button: "binary_sensor.{{ nspanel_name_trigger }}_left_button"
|
||||
right_button: "binary_sensor.{{ nspanel_name_trigger }}_right_button"
|
||||
nextion_inited_trigger: "switch.{{ nspanel_name_trigger }}_nextion_inited"
|
||||
|
||||
variables:
|
||||
nspanel_name: !input "nspanel_name"
|
||||
@@ -671,15 +674,13 @@ variables:
|
||||
command_background_color: "esphome.{{ nspanel_name }}_send_command_background_color"
|
||||
tft_upload: esphome.{{ nspanel_name }}_upload_tft
|
||||
tft_path: !input "tft_path"
|
||||
# nextion_inited: !input "nextion_inited"
|
||||
humidity: !input "humidity"
|
||||
hotwatertemp: !input "hotwatertemp"
|
||||
outdoortemp: !input "outdoortemp"
|
||||
time: "{{ (as_timestamp(now()) | timestamp_custom('%H:%M')) }}"
|
||||
weather: !input "weather"
|
||||
nextion_inited: !input "nextion_inited"
|
||||
language: !input "language"
|
||||
left_button: binary_sensor.{{ nspanel_name }}_left_button
|
||||
right_button: binary_sensor.{{ nspanel_name }}_right_button
|
||||
left_button_entity: !input 'left_button_entity'
|
||||
right_button_entity: !input 'right_button_entity'
|
||||
button_light_off: "90"
|
||||
@@ -852,74 +853,101 @@ trigger:
|
||||
path: !input "tft_path"
|
||||
id: tft_upload
|
||||
|
||||
#### NSPanel boot Step 0 - Start ####
|
||||
- platform: state
|
||||
entity_id: !input "nextion_inited"
|
||||
to: "on"
|
||||
#### NSPanel boot Step 0 - Start #### nextion_inited_trigger
|
||||
# - platform: state
|
||||
# entity_id: !input "nextion_inited"
|
||||
# to: "on"
|
||||
# id: nspanel_boot_start
|
||||
- platform: template
|
||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||
id: nspanel_boot_start
|
||||
|
||||
#### NSPanel boot Step 1 - Language ####
|
||||
- platform: state
|
||||
entity_id: !input "nextion_inited"
|
||||
to: "on"
|
||||
for:
|
||||
seconds: 5
|
||||
# - platform: state
|
||||
# entity_id: !input "nextion_inited"
|
||||
# to: "on"
|
||||
# for:
|
||||
# seconds: 5
|
||||
- platform: template
|
||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||
for: "00:00:5"
|
||||
id: nspanel_boot_language
|
||||
|
||||
#### NSPanel boot Step 2 - Buttonpage 1 ####
|
||||
- platform: state
|
||||
entity_id: !input "nextion_inited"
|
||||
to: "on"
|
||||
for:
|
||||
seconds: 10
|
||||
# - platform: state
|
||||
# entity_id: !input "nextion_inited"
|
||||
# to: "on"
|
||||
# for:
|
||||
# seconds: 10
|
||||
- platform: template
|
||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||
for: "00:00:10"
|
||||
id: nspanel_boot_buttonpage01
|
||||
|
||||
#### NSPanel boot Step 3 - Buttonpage 2 ####
|
||||
- platform: state
|
||||
entity_id: !input "nextion_inited"
|
||||
to: "on"
|
||||
for:
|
||||
seconds: 15
|
||||
# - platform: state
|
||||
# entity_id: !input "nextion_inited"
|
||||
# to: "on"
|
||||
# for:
|
||||
# seconds: 15
|
||||
- platform: template
|
||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||
for: "00:00:15"
|
||||
id: nspanel_boot_buttonpage02
|
||||
|
||||
#### NSPanel boot Step 4 - Buttonpage 3 ####
|
||||
- platform: state
|
||||
entity_id: !input "nextion_inited"
|
||||
to: "on"
|
||||
for:
|
||||
seconds: 20
|
||||
# - platform: state
|
||||
# entity_id: !input "nextion_inited"
|
||||
# to: "on"
|
||||
# for:
|
||||
# seconds: 20
|
||||
- platform: template
|
||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||
for: "00:00:20"
|
||||
id: nspanel_boot_buttonpage03
|
||||
|
||||
#### NSPanel boot Step 5 - Buttonpage 4 ####
|
||||
- platform: state
|
||||
entity_id: !input "nextion_inited"
|
||||
to: "on"
|
||||
for:
|
||||
seconds: 25
|
||||
# - platform: state
|
||||
# entity_id: !input "nextion_inited"
|
||||
# to: "on"
|
||||
# for:
|
||||
# seconds: 25
|
||||
- platform: template
|
||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||
for: "00:00:25"
|
||||
id: nspanel_boot_buttonpage04
|
||||
|
||||
#### NSPanel boot Step 6 - Weather ####
|
||||
- platform: state
|
||||
entity_id: !input "nextion_inited"
|
||||
to: "on"
|
||||
for:
|
||||
seconds: 30
|
||||
# - platform: state
|
||||
# entity_id: !input "nextion_inited"
|
||||
# to: "on"
|
||||
# for:
|
||||
# seconds: 30
|
||||
- platform: template
|
||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||
for: "00:00:30"
|
||||
id: nspanel_boot_weather
|
||||
|
||||
#### NSPanel boot Step 7 - Entities ####
|
||||
- platform: state
|
||||
entity_id: !input "nextion_inited"
|
||||
to: "on"
|
||||
for:
|
||||
seconds: 35
|
||||
# - platform: state
|
||||
# entity_id: !input "nextion_inited"
|
||||
# to: "on"
|
||||
# for:
|
||||
# seconds: 35
|
||||
- platform: template
|
||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||
for: "00:00:35"
|
||||
id: nspanel_boot_entities
|
||||
|
||||
#### NSPanel boot Step 8 - Entities ####
|
||||
- platform: state
|
||||
entity_id: !input "nextion_inited"
|
||||
to: "on"
|
||||
for:
|
||||
seconds: 50
|
||||
# - platform: state
|
||||
# entity_id: !input "nextion_inited"
|
||||
# to: "on"
|
||||
# for:
|
||||
# seconds: 50
|
||||
- platform: template
|
||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||
for: "00:00:50"
|
||||
id: nspanel_boot_finish
|
||||
|
||||
########################################################################################################################
|
||||
@@ -935,7 +963,7 @@ trigger:
|
||||
- platform: template
|
||||
value_template: '{{ states(last_click) is match "press" }}'
|
||||
for:
|
||||
seconds: 2
|
||||
seconds: 1
|
||||
id: long_press
|
||||
|
||||
##### Page Lightsettings - Trigger #####
|
||||
@@ -996,14 +1024,14 @@ trigger:
|
||||
id: outdoortemp_state
|
||||
|
||||
##### Left Button - Trigger #####
|
||||
# - platform: template
|
||||
# value_template: '{{ states(left_button) == "on" }}'
|
||||
# id: left_button_press
|
||||
- platform: template
|
||||
value_template: '{{ states(left_button) is match "on" }}'
|
||||
id: left_button_press
|
||||
|
||||
##### Right Button - Trigger #####
|
||||
# - platform: template
|
||||
# value_template: '{{ states(right_button) == "on" }}'
|
||||
# id: right_button_press
|
||||
- platform: template
|
||||
value_template: '{{ states(right_button) is match "off" }}'
|
||||
id: right_button_press
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
@@ -1560,11 +1588,20 @@ action:
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: lightsettings.a03
|
||||
message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 254) |round(0) }} %'
|
||||
message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %'
|
||||
- service: "{{ command_value }}"
|
||||
data:
|
||||
component: lightsettings.lightslider
|
||||
message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}'
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: lightsettings.a04
|
||||
message: '{{ state_attr(entity_long, "color_temp") |int }}'
|
||||
message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}'
|
||||
- service: "{{ command_value }}"
|
||||
data:
|
||||
component: lightsettings.tempslider
|
||||
message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}'
|
||||
|
||||
|
||||
##### Page Lightsettings - SYNC Light Button ON / OFF #####
|
||||
- choose:
|
||||
@@ -1590,11 +1627,11 @@ action:
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id: "{{ entity_long }}"
|
||||
brightness_pct: '{{ states(last_click_lightsettings) |replace("brightness","") | int }}'
|
||||
brightness: '{{ states(last_click_lightsettings) |replace("brightness","") | int }}'
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: lightsettings.a03
|
||||
message: '{{ states(last_click_lightsettings) |replace("brightness","") | int }} %'
|
||||
message: '{{ ((states(last_click_lightsettings) |replace("brightness","") | int) * 100 /255) |round(0) }} %'
|
||||
|
||||
##### Page Lightsettings - Color_Temp Slider #####
|
||||
- choose:
|
||||
@@ -1642,12 +1679,14 @@ action:
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: lightsettings.a03
|
||||
message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 254) |round(0) }} %'
|
||||
message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %'
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: lightsettings.a04
|
||||
message: '{{ state_attr(entity_long, "color_temp") |int }}'
|
||||
|
||||
|
||||
|
||||
##### Page Lightsettings - Close Lightsettings #####
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -1679,6 +1718,10 @@ action:
|
||||
data:
|
||||
component: coversettings.a04
|
||||
message: '{{ (state_attr(entity_long, "battery") | int ) |round(0) }} %'
|
||||
- service: "{{ command_value }}"
|
||||
data:
|
||||
component: coversettings.coverslider
|
||||
message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}'
|
||||
|
||||
##### Page Coversettings - SYNC Cover Button ON / OFF #####
|
||||
- choose:
|
||||
@@ -1710,6 +1753,7 @@ action:
|
||||
component: coversettings.a03
|
||||
message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %'
|
||||
|
||||
|
||||
##### Page Coversettings - Toggle Cover #####
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -1727,6 +1771,10 @@ action:
|
||||
data:
|
||||
component: coversettings.a03
|
||||
message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %'
|
||||
- service: "{{ command_value }}"
|
||||
data:
|
||||
component: coversettings.coverslider
|
||||
message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}'
|
||||
|
||||
##### Page Coversettings - Close Coversettings #####
|
||||
- choose:
|
||||
@@ -1846,42 +1894,42 @@ action:
|
||||
message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°"
|
||||
|
||||
##### Left Button - Toggle #####
|
||||
# - choose:
|
||||
# - conditions:
|
||||
# - condition: trigger
|
||||
# id: left_button_press
|
||||
# sequence:
|
||||
# - service: >-
|
||||
# {% if left_button_entity is match 'light.' %}
|
||||
# light.toggle
|
||||
# {% elif left_button_entity is match 'switch.' %}
|
||||
# switch.toggle
|
||||
# {% elif left_button_entity is match 'cover.' %}
|
||||
# cover.toggle
|
||||
# {% elif left_button_entity is match 'input_boolean.' %}
|
||||
# input_boolean.toggle
|
||||
# {% endif %}
|
||||
# data:
|
||||
# entity_id: "{{ left_button_entity }}"
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: left_button_press
|
||||
sequence:
|
||||
- service: >-
|
||||
{% if left_button_entity is match 'light.' %}
|
||||
light.toggle
|
||||
{% elif left_button_entity is match 'switch.' %}
|
||||
switch.toggle
|
||||
{% elif left_button_entity is match 'cover.' %}
|
||||
cover.toggle
|
||||
{% elif left_button_entity is match 'input_boolean.' %}
|
||||
input_boolean.toggle
|
||||
{% endif %}
|
||||
data:
|
||||
entity_id: "{{ left_button_entity }}"
|
||||
|
||||
##### Right Button - Toggle #####
|
||||
# - choose:
|
||||
# - conditions:
|
||||
# - condition: trigger
|
||||
# id: right_button_press
|
||||
# sequence:
|
||||
# - service: >-
|
||||
# {% if right_button_entity is match 'light.' %}
|
||||
# light.toggle
|
||||
# {% elif right_button_entity is match 'switch.' %}
|
||||
# switch.toggle
|
||||
# {% elif right_button_entity is match 'cover.' %}
|
||||
# cover.toggle
|
||||
# {% elif right_button_entity is match 'input_boolean.' %}
|
||||
# input_boolean.toggle
|
||||
# {% endif %}
|
||||
# data:
|
||||
# entity_id: "{{ right_button_entity }}"
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: right_button_press
|
||||
sequence:
|
||||
- service: >-
|
||||
{% if right_button_entity is match 'light.' %}
|
||||
light.toggle
|
||||
{% elif right_button_entity is match 'switch.' %}
|
||||
switch.toggle
|
||||
{% elif right_button_entity is match 'cover.' %}
|
||||
cover.toggle
|
||||
{% elif right_button_entity is match 'input_boolean.' %}
|
||||
input_boolean.toggle
|
||||
{% endif %}
|
||||
data:
|
||||
entity_id: "{{ right_button_entity }}"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user