diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 591404b..078b885 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -279,6 +279,12 @@ The goal was to create a version that allows everyone to use the NSpanel fully l default: [] selector: text: {} + relay_1_local_fallback: + name: Activate Relay 1 local Fallback (Optional) + default: false + description: '* *activate this to use left button to toggle relay 1 if display is offline* ' + selector: + boolean: right_button_entity: name: Right Button (Optional) description: '* *Right Hardware Button - Select the entity that should be switched*' @@ -302,6 +308,12 @@ The goal was to create a version that allows everyone to use the NSpanel fully l default: [] selector: text: {} + relay_2_local_fallback: + name: Activate Relay 2 local Fallback (Optional) + default: false + description: '* *activate this to use right button to toggle relay 2 if display is offline* ' + selector: + boolean: ##### BUTTON Page Labels ##### button_page01_label: @@ -1410,6 +1422,8 @@ variables: qrcode_label: !input "qrcode_label" qrcode_value: !input "qrcode_value" qrcode_state: !input "qrcode_state" + relay_1_local_fallback: !input "relay_1_local_fallback" + relay_2_local_fallback: !input "relay_2_local_fallback" #### HARDWARE BUTTONS ##### left_button_entity: !input "left_button_entity" @@ -2830,6 +2844,30 @@ action: data: song_str: "two short:d=4,o=5,b=100:16e6,16e6" + ###### Set local fallback ###### + - if: + - condition: template + value_template: '{{ relay_1_local_fallback }}' + then: + - service: switch.turn_on + data: + entity_id: 'switch.{{ nspanel_name }}_relay_1_local_fallback' + else: + - service: switch.turn_off + data: + entity_id: 'switch.{{ nspanel_name }}_relay_1_local_fallback' + - if: + - condition: template + value_template: '{{ relay_2_local_fallback }}' + then: + - service: switch.turn_on + data: + entity_id: 'switch.{{ nspanel_name }}_relay_2_local_fallback' + else: + - service: switch.turn_off + data: + entity_id: 'switch.{{ nspanel_name }}_relay_2_local_fallback' + ##### NSPanel boot init finished and jump to Home Page##### - delay: milliseconds: "{{ delay_value }}"