Update BETA_blueprint.yaml
This commit is contained in:
@@ -664,6 +664,8 @@ trigger_variables:
|
|||||||
left_button: "binary_sensor.{{ nspanel_name_trigger }}_left_button"
|
left_button: "binary_sensor.{{ nspanel_name_trigger }}_left_button"
|
||||||
right_button: "binary_sensor.{{ nspanel_name_trigger }}_right_button"
|
right_button: "binary_sensor.{{ nspanel_name_trigger }}_right_button"
|
||||||
nextion_inited_trigger: "switch.{{ nspanel_name_trigger }}_nextion_inited"
|
nextion_inited_trigger: "switch.{{ nspanel_name_trigger }}_nextion_inited"
|
||||||
|
entity_long_trigger: "{{ entity_long }}"
|
||||||
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
nspanel_name: !input "nspanel_name"
|
nspanel_name: !input "nspanel_name"
|
||||||
@@ -683,6 +685,12 @@ variables:
|
|||||||
language: !input "language"
|
language: !input "language"
|
||||||
left_button_entity: !input 'left_button_entity'
|
left_button_entity: !input 'left_button_entity'
|
||||||
right_button_entity: !input 'right_button_entity'
|
right_button_entity: !input 'right_button_entity'
|
||||||
|
|
||||||
|
# Icons Mapping
|
||||||
|
cover_pic_closed: "106"
|
||||||
|
cover_pic_open: "107"
|
||||||
|
|
||||||
|
# color for buttons
|
||||||
button_light_off: "90"
|
button_light_off: "90"
|
||||||
button_light_on: "91"
|
button_light_on: "91"
|
||||||
button_switch_off: "92"
|
button_switch_off: "92"
|
||||||
@@ -1288,6 +1296,42 @@ action:
|
|||||||
{%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32 }}
|
{%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32 }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
##### Entity Name - Page Lightsettings #####
|
||||||
|
entity_long_name: >-
|
||||||
|
{%- if states(last_click) == "pressbuttonpage01button01" -%} {{ entity01_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ entity02_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage01button03" -%} {{ entity03_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage01button04" -%} {{ entity04_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage01button05" -%} {{ entity05_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage01button06" -%} {{ entity06_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage01button07" -%} {{ entity07_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage01button08" -%} {{ entity08_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage02button01" -%} {{ entity09_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage02button02" -%} {{ entity10_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage02button03" -%} {{ entity11_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage02button04" -%} {{ entity12_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage02button05" -%} {{ entity13_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage02button06" -%} {{ entity14_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage02button07" -%} {{ entity15_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage02button08" -%} {{ entity16_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage03button01" -%} {{ entity17_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage03button02" -%} {{ entity18_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage03button03" -%} {{ entity19_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage03button04" -%} {{ entity20_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage03button05" -%} {{ entity21_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage03button06" -%} {{ entity22_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage03button07" -%} {{ entity23_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage03button08" -%} {{ entity24_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage04button01" -%} {{ entity25_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage04button02" -%} {{ entity26_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage04button03" -%} {{ entity27_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage04button04" -%} {{ entity28_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage04button05" -%} {{ entity29_name}}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ entity30_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ entity31_name }}
|
||||||
|
{%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32_name }}
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
##### Entity - Page Lightsettings - Skip Back #####
|
##### Entity - Page Lightsettings - Skip Back #####
|
||||||
entity_back: >-
|
entity_back: >-
|
||||||
{%- if states(last_click) == "pressbuttonpage01button01" -%} {{ "page buttonpage01" }}
|
{%- if states(last_click) == "pressbuttonpage01button01" -%} {{ "page buttonpage01" }}
|
||||||
@@ -1685,8 +1729,6 @@ action:
|
|||||||
component: lightsettings.a04
|
component: lightsettings.a04
|
||||||
message: '{{ state_attr(entity_long, "color_temp") |int }}'
|
message: '{{ state_attr(entity_long, "color_temp") |int }}'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### Page Lightsettings - Close Lightsettings #####
|
##### Page Lightsettings - Close Lightsettings #####
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
@@ -1699,82 +1741,128 @@ action:
|
|||||||
data:
|
data:
|
||||||
cmd: "{{ entity_back }}"
|
cmd: "{{ entity_back }}"
|
||||||
|
|
||||||
|
##### Cover Page #####
|
||||||
|
|
||||||
##### Page Coversettings - JUMP to Page Coversettings and SYNC Cover Settings #####
|
##### Page Coversettings - JUMP to Page Coversettings and SYNC Cover Settings #####
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: long_press
|
id: long_press
|
||||||
- condition: template
|
|
||||||
value_template: '{{ entity_long is match "cover." }}'
|
|
||||||
sequence:
|
sequence:
|
||||||
- service: "{{ command_printf }}"
|
- if:
|
||||||
data:
|
- condition: template
|
||||||
cmd: page coversettings
|
value_template: '{{ entity_long is match "cover." }}'
|
||||||
- service: "{{ command_text_printf }}"
|
then:
|
||||||
data:
|
- service: "{{ command_printf }}"
|
||||||
component: coversettings.a03
|
data:
|
||||||
message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %'
|
cmd: page coversettings
|
||||||
- service: "{{ command_text_printf }}"
|
- service: "{{ command_text_printf }}"
|
||||||
data:
|
data:
|
||||||
component: coversettings.a04
|
component: coversettings.cover_value
|
||||||
message: '{{ (state_attr(entity_long, "battery") | int ) |round(0) }} %'
|
message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %'
|
||||||
- service: "{{ command_value }}"
|
- service: "{{ command_text_printf }}"
|
||||||
data:
|
data:
|
||||||
component: coversettings.coverslider
|
component: coversettings.cover_name
|
||||||
message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}'
|
message: '{{ entity_long_name }}'
|
||||||
|
- service: "{{ command_text_printf }}"
|
||||||
|
data:
|
||||||
|
component: coversettings.battery_value
|
||||||
|
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) }}'
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ states(entity_long) == "open" }}'
|
||||||
|
then:
|
||||||
|
- service: "{{ command_printf }}"
|
||||||
|
data:
|
||||||
|
cmd: coversettings.cover_status.pic={{ cover_pic_open }}
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ states(entity_long) == "closed" }}'
|
||||||
|
then:
|
||||||
|
- service: "{{ command_printf }}"
|
||||||
|
data:
|
||||||
|
cmd: coversettings.cover_status.pic={{ cover_pic_closed }}
|
||||||
|
|
||||||
##### Page Coversettings - SYNC Cover Button ON / OFF #####
|
##### Page Coversettings - Changed from HA #####
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: long_press
|
id:
|
||||||
- condition: template
|
- current_state_entity02
|
||||||
value_template: '{{ states(entity_long) == "open" }}'
|
|
||||||
sequence:
|
sequence:
|
||||||
- service: "{{ command_value }}"
|
- if:
|
||||||
data:
|
- condition: template
|
||||||
component: coversettings.a06
|
value_template: '{{ entity_long is match "cover." }}'
|
||||||
message: 1
|
then:
|
||||||
|
- service: "{{ command_text_printf }}"
|
||||||
|
data:
|
||||||
|
component: coversettings.cover_value
|
||||||
|
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) }}'
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ states(entity_long) == "open" }}'
|
||||||
|
then:
|
||||||
|
- service: "{{ command_printf }}"
|
||||||
|
data:
|
||||||
|
cmd: coversettings.cover_status.pic={{ cover_pic_open }}
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ states(entity_long) == "closed" }}'
|
||||||
|
then:
|
||||||
|
- service: "{{ command_printf }}"
|
||||||
|
data:
|
||||||
|
cmd: coversettings.cover_status.pic={{ cover_pic_closed }}
|
||||||
|
|
||||||
##### Page Coversettings - Cover Slider #####
|
##### Page Coversettings - Cover Slider move #####
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- cover_settings
|
||||||
|
sequence:
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ states(last_click_coversettings) is match "coverposition\d+" }}'
|
||||||
|
then:
|
||||||
|
- service: cover.set_cover_position
|
||||||
|
data:
|
||||||
|
entity_id: "{{ entity_long }}"
|
||||||
|
position: '{{ states(last_click_coversettings) |replace("coverposition","") | int }}'
|
||||||
|
- service: "{{ command_text_printf }}"
|
||||||
|
data:
|
||||||
|
component: coversettings.cover_value
|
||||||
|
message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %'
|
||||||
|
|
||||||
|
##### Page Coversettings - UP AND DOWN Cover #####
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: cover_settings
|
id: cover_settings
|
||||||
- condition: template
|
|
||||||
value_template: '{{ states(last_click_coversettings) is match "coverposition\d+" }}'
|
|
||||||
sequence:
|
sequence:
|
||||||
- service: cover.set_cover_position
|
- if:
|
||||||
data:
|
- condition: template
|
||||||
entity_id: "{{ entity_long }}"
|
value_template: '{{ states(last_click_coversettings) == "cover_close_press" }}'
|
||||||
position: '{{ states(last_click_coversettings) |replace("coverposition","") | int }}'
|
then:
|
||||||
- service: "{{ command_text_printf }}"
|
- service: cover.close_cover
|
||||||
data:
|
data:
|
||||||
component: coversettings.a03
|
entity_id: "{{ entity_long }}"
|
||||||
message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %'
|
#####
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
##### Page Coversettings - Toggle Cover #####
|
value_template: '{{ states(last_click_coversettings) == "cover_open_press" }}'
|
||||||
- choose:
|
then:
|
||||||
- conditions:
|
- service: cover.open_cover
|
||||||
- condition: trigger
|
data:
|
||||||
id: cover_settings
|
entity_id: "{{ entity_long }}"
|
||||||
- condition: template
|
#####
|
||||||
value_template: '{{ states(last_click_coversettings) == "releasecover" }}'
|
|
||||||
sequence:
|
|
||||||
- service: cover.toggle
|
|
||||||
data:
|
|
||||||
entity_id: "{{ entity_long }}"
|
|
||||||
- delay:
|
|
||||||
milliseconds: 250
|
|
||||||
- service: "{{ command_text_printf }}"
|
|
||||||
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 #####
|
##### Page Coversettings - Close Coversettings #####
|
||||||
- choose:
|
- choose:
|
||||||
|
|||||||
Reference in New Issue
Block a user