QR Code rdy

This commit is contained in:
Blackymas
2023-01-23 00:14:00 +01:00
parent d645f4c02e
commit fa08f6b54a

View File

@@ -233,7 +233,28 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
description: '* *Depends on your climate device and HA-Integration. If optimisitc mode is **OFF** then changes are made will wait for response from device to update temperature in the display. This can cause delays or jumping values. If **ON** the script update the display immediately but apply changes after closing climate-page* '
selector:
boolean:
qrcode_state:
name: Activate QR Code (Optional)
default: false
description: '* *activate the QR code page and QR Code Button on the home page* '
selector:
boolean:
qrcode_label:
name: Name "QR Code Page" (Optional)
description: '* *Displayed on top of **"QR Code"***'
default: []
selector:
text: {}
qrcode_value:
name: QR Code content (Optional)
description: '* *Value you want to display as QR code*'
default: []
selector:
text: {}
##### HARDWARE BUTTONS #####
left_button_entity:
name: Left Button (Optional)
@@ -284,28 +305,28 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
##### BUTTON Page Labels #####
button_page01_label:
name: Name **"Button Page 1"** (Optional)
name: Name "Button Page 1" (Optional)
description: '* *Displayed on top of **"Button Page 1"***'
default: []
selector:
text: {}
button_page02_label:
name: Name **"Button Page 2"** (Optional)
name: Name "Button Page 2" (Optional)
description: '* *Displayed on top of **"Button Page 2"***'
default: []
selector:
text: {}
button_page03_label:
name: Name **"Button Page 3"** (Optional)
name: Name "Button Page 3" (Optional)
description: '* *Displayed on top of **"Button Page 3"***'
default: []
selector:
text: {}
button_page04_label:
name: Name **"Button Page 4"** (Optional)
name: Name "Button Page 4" (Optional)
description: '* *Displayed on top of **"Button Page 4"***'
default: []
selector:
@@ -1386,6 +1407,9 @@ variables:
outdoortemp: !input "outdoortemp"
indoortemp: !input "indoortemp"
climate: !input "climate"
qrcode_label: !input "qrcode_label"
qrcode_value: !input "qrcode_value"
qrcode_state: !input "qrcode_state"
#### HARDWARE BUTTONS #####
left_button_entity: !input "left_button_entity"
@@ -1476,6 +1500,7 @@ variables:
home_button_blank: "116"
home_button_notify_white: "117"
home_button_notify_red: "118"
home_button_qrcode: "123"
###### NEXTION COLOR MAPPING #####
button_color_1: "65535"
@@ -2224,7 +2249,7 @@ trigger:
#### Show QR code - Trigger ####
- platform: template
value_template: '{{ states(last_click) is match "homebutton08release" }}'
value_template: '{{ states(last_click) is match "homebutton05release" }}'
id: open_qrcode_page
@@ -2811,7 +2836,6 @@ action:
- service: "{{ command_printf }}"
data:
cmd: page home
#### Notification Symbol ####
- conditions:
@@ -2858,8 +2882,8 @@ action:
- conditions:
- condition: trigger
id: open_qrcode_page
# - condition: template
# value_template: "{{ states(notification_text) |length > 0}} "
- condition: template
value_template: '{{ qrcode_state == true }}'
sequence:
- service: "{{ command_printf }}"
data:
@@ -4547,6 +4571,17 @@ action:
data:
cmd: "homebt04_pic.pic={{ notify_pic }}"
###### QR Code - Icon ######
- if:
- condition: template
value_template: '{{ qrcode_state == true }}'
then:
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_printf }}"
data:
cmd: "homebt05_pic.pic={{ home_button_qrcode }}"
###### StatusBar - Icon 04 ######
- if:
- condition: template
@@ -5905,9 +5940,22 @@ action:
## PAGE QR Code ##
- conditions: '{{ trigger.event.data.new_state.state == page_qrcode }}'
sequence:
##### QR Code Page Label #####
- if:
- condition: template
value_template: '{{ qrcode_label |length > 0 }}'
then:
- service: "{{ command_text_printf }}"
data:
component: "qrcode_label"
message: "{{ qrcode_label }}"
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_text_printf }}"
data:
component: "qrcode_value"
message: "{{ qrcode_value }}"
##### Open Climate Settings #####
- conditions: