upd: trigger on automation-reload
This commit is contained in:
@@ -1383,7 +1383,7 @@ trigger_variables:
|
|||||||
|
|
||||||
variables:
|
variables:
|
||||||
##### GENERAL #####
|
##### GENERAL #####
|
||||||
blueprint_version: "3.1.0"
|
blueprint_version: "3.1.1"
|
||||||
nspanel_name: !input "nspanel_name"
|
nspanel_name: !input "nspanel_name"
|
||||||
time: "{{ (as_timestamp(now()) | timestamp_custom('%H:%M')) }}"
|
time: "{{ (as_timestamp(now()) | timestamp_custom('%H:%M')) }}"
|
||||||
language: !input "language"
|
language: !input "language"
|
||||||
@@ -2112,6 +2112,11 @@ trigger:
|
|||||||
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
value_template: '{{ states(nextion_inited_trigger) is match "on" }}'
|
||||||
id: nspanel_boot_init
|
id: nspanel_boot_init
|
||||||
|
|
||||||
|
##### Automation reload
|
||||||
|
- platform: event
|
||||||
|
event_type: automation_reloaded
|
||||||
|
id: automation_reloaded
|
||||||
|
|
||||||
##### TFT Upload - Trigger "tft_upload" #####
|
##### TFT Upload - Trigger "tft_upload" #####
|
||||||
- platform: event
|
- platform: event
|
||||||
event_type: folder_watcher
|
event_type: folder_watcher
|
||||||
@@ -2607,16 +2612,24 @@ action:
|
|||||||
##### NSPanel boot init #####
|
##### NSPanel boot init #####
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: nspanel_boot_init
|
id:
|
||||||
|
- nspanel_boot_init
|
||||||
|
- automation_reloaded
|
||||||
sequence:
|
sequence:
|
||||||
|
|
||||||
##### NSPanel boot init start #####
|
|
||||||
- delay:
|
- delay:
|
||||||
milliseconds: 100
|
milliseconds: 100
|
||||||
- service: "{{ command_text_printf }}"
|
|
||||||
data:
|
##### NSPanel boot init only #####
|
||||||
component: boot.bluep_version
|
- if:
|
||||||
message: "{{ blueprint_version }}"
|
- condition: template
|
||||||
|
value_template: '{{ trigger.id == "nspanel_boot_init" }}'
|
||||||
|
then:
|
||||||
|
##### NSPanel boot init start #####
|
||||||
|
|
||||||
|
- service: "{{ command_text_printf }}"
|
||||||
|
data:
|
||||||
|
component: boot.bluep_version
|
||||||
|
message: "{{ blueprint_version }}"
|
||||||
|
|
||||||
##### NSPanel boot init buttons #####
|
##### NSPanel boot init buttons #####
|
||||||
- delay:
|
- delay:
|
||||||
@@ -2834,21 +2847,6 @@ action:
|
|||||||
component: "{{ component_to_update }}bri"
|
component: "{{ component_to_update }}bri"
|
||||||
message: "{{ btn_bri_txt }}"
|
message: "{{ btn_bri_txt }}"
|
||||||
|
|
||||||
###### INIT Notify ######
|
|
||||||
- service: "{{ command_notification_clear }}"
|
|
||||||
data: {}
|
|
||||||
|
|
||||||
###### NSPanel beep ######
|
|
||||||
- delay:
|
|
||||||
milliseconds: 100
|
|
||||||
- if:
|
|
||||||
- condition: template
|
|
||||||
value_template: '{{ is_state(notification_sound, "on") }}'
|
|
||||||
then:
|
|
||||||
- service: "{{ command_play_rtttl }}"
|
|
||||||
data:
|
|
||||||
song_str: "two short:d=4,o=5,b=100:16e6,16e6"
|
|
||||||
|
|
||||||
###### Set local fallback ######
|
###### Set local fallback ######
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
@@ -2873,12 +2871,33 @@ action:
|
|||||||
data:
|
data:
|
||||||
entity_id: 'switch.{{ nspanel_name }}_relay_2_local_fallback'
|
entity_id: 'switch.{{ nspanel_name }}_relay_2_local_fallback'
|
||||||
|
|
||||||
##### NSPanel boot init finished and jump to Home Page#####
|
|
||||||
- delay:
|
##### NSPanel boot init only #####
|
||||||
milliseconds: "{{ delay_value }}"
|
- if:
|
||||||
- service: "{{ command_printf }}"
|
- condition: template
|
||||||
data:
|
value_template: '{{ trigger.id == "nspanel_boot_init" }}'
|
||||||
cmd: page home
|
then:
|
||||||
|
###### INIT Notify ######
|
||||||
|
- service: "{{ command_notification_clear }}"
|
||||||
|
data: {}
|
||||||
|
|
||||||
|
###### NSPanel beep ######
|
||||||
|
- delay:
|
||||||
|
milliseconds: 100
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ is_state(notification_sound, "on") }}'
|
||||||
|
then:
|
||||||
|
- service: "{{ command_play_rtttl }}"
|
||||||
|
data:
|
||||||
|
song_str: "two short:d=4,o=5,b=100:16e6,16e6"
|
||||||
|
|
||||||
|
##### NSPanel boot init finished and jump to Home Page#####
|
||||||
|
- delay:
|
||||||
|
milliseconds: "{{ delay_value }}"
|
||||||
|
- service: "{{ command_printf }}"
|
||||||
|
data:
|
||||||
|
cmd: page home
|
||||||
|
|
||||||
#### Notification Symbol ####
|
#### Notification Symbol ####
|
||||||
- conditions:
|
- conditions:
|
||||||
@@ -3565,7 +3584,7 @@ action:
|
|||||||
{%- elif states(last_click) == "releasebuttonpage04button08" -%} {{ entity32_confirm }}
|
{%- elif states(last_click) == "releasebuttonpage04button08" -%} {{ entity32_confirm }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ entity_short is not match "person." and entity_short is not match "binary_sensor." }}'
|
value_template: '{{ entity_short |length > 0 and entity_short is not match "person." and entity_short is not match "binary_sensor." }}'
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ entity_confirm }}"
|
value_template: "{{ entity_confirm }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user