change esphome lastclick

This commit is contained in:
Blackymas
2022-11-07 22:12:55 +01:00
parent 577985f283
commit 3ee83a1646
2 changed files with 56 additions and 21 deletions

View File

@@ -7,12 +7,16 @@ blueprint:
description: v2.0.0 - Configuration and synchronization NSpanele via Blueprint description: v2.0.0 - Configuration and synchronization NSpanele via Blueprint
domain: automation domain: automation
input: input:
##### MAIN NAME #####
nspanel_name: nspanel_name:
name: ESPhome Node Name name: ESPhome Node Name
description: 'Here you have to enter the exact same name "node_name" as in the ESPHome file. Example nspanel_name' description: 'Here you have to enter the exact same name "device_name" as in the ESPHome file. Example nspanel-name'
default: [nspanel_name] default: [nspanel-name]
selector: selector:
text: {} text: {}
##### SYSTEM SETTINGS #####
language: language:
name: Language for NSPanel name: Language for NSPanel
description: 'select your language for the NSPanel Display' description: 'select your language for the NSPanel Display'
@@ -55,6 +59,8 @@ blueprint:
value: select_no value: select_no
- label: 'Yes' - label: 'Yes'
value: select_yes value: select_yes
##### WEATHER #####
weather: weather:
name: Weather Integration name: Weather Integration
description: 'select our Weather Integration' description: 'select our Weather Integration'
@@ -69,6 +75,8 @@ blueprint:
default: [] default: []
selector: selector:
text: {} text: {}
##### GENERAL ENTITYS #####
outdoortemp: outdoortemp:
name: Outdoor Temperature Sensor (Optional) name: Outdoor Temperature Sensor (Optional)
description: 'If no outdoor sensor is available, leave the field empty. If this field is not filled in, the outdoor temperature will be taken from your selected weather integration. If an entity is selected, the value is displayed on the *"Home Page"* and *"Thermostat Page"*' description: 'If no outdoor sensor is available, leave the field empty. If this field is not filled in, the outdoor temperature will be taken from your selected weather integration. If an entity is selected, the value is displayed on the *"Home Page"* and *"Thermostat Page"*'
@@ -93,6 +101,8 @@ blueprint:
entity: entity:
domain: domain:
- sensor - sensor
##### HARDWARE BUTTONS #####
left_button_entity: left_button_entity:
name: Left Button (Optional) name: Left Button (Optional)
description: 'Left Hardware Button - Select the entity that should be switched' description: 'Left Hardware Button - Select the entity that should be switched'
@@ -104,7 +114,6 @@ blueprint:
- switch - switch
- input_boolean - input_boolean
- cover - cover
left_button_name: left_button_name:
name: Name "Left Button" (Optional) name: Name "Left Button" (Optional)
description: 'Left Button label - 10 characters are supported' description: 'Left Button label - 10 characters are supported'
@@ -129,7 +138,33 @@ blueprint:
selector: selector:
text: {} text: {}
##### Button ##### ##### COLOR PICKER #####
color_picker01:
name: Color Picker 01
description: 'Fast color selection in the Lightsettings menu '
selector:
select:
mode: dropdown
options:
- yellow
- yellow-orange
- orange
- red
- red-violett
- violett
- blue-violett
- blue
- cyan
- turquoise
- green
- green-yellow
- white-blue
- white
- white-light
- white-middle
- white-strong
##### BUTTONS #####
entity01: entity01:
name: Button 01 (Optional) name: Button 01 (Optional)
description: Nextion Editor - *buttonpage01.button01* **(ONLY light | switch | cover | input_boolean)** description: Nextion Editor - *buttonpage01.button01* **(ONLY light | switch | cover | input_boolean)**

View File

@@ -278,25 +278,25 @@ globals:
initial_value: '0' initial_value: '0'
##### lastclick State ##### ##### lastclick State #####
- id: lastclick_global - id: lastclick_general_global
type: std::string type: std::string
restore_value: no restore_value: no
initial_value: '' initial_value: ''
##### lastclick State ##### ##### lastclick State #####
- id: last_click_lightsettings - id: lastclick_lightsettings_global
type: std::string type: std::string
restore_value: no restore_value: no
initial_value: '' initial_value: ''
##### lastclick State ##### ##### lastclick State #####
- id: last_click_coversettings - id: lastclick_coversettings_global
type: std::string type: std::string
restore_value: no restore_value: no
initial_value: '' initial_value: ''
##### lastclick State ##### ##### lastclick State #####
- id: last_click_weathersettings - id: lastclick_climatesettings_global
type: std::string type: std::string
restore_value: no restore_value: no
initial_value: '' initial_value: ''
@@ -777,13 +777,13 @@ text_sensor:
- platform: nextion - platform: nextion
nextion_id: disp1 nextion_id: disp1
name: ${device_name} Last Click name: ${device_name} Last Click
id: disp1_last_click_nextion id: disp1_lastclick_general
update_interval: 50ms update_interval: 50ms
component_name: lastclick component_name: lastclick
internal: false internal: false
filters: filters:
- lambda: |- - lambda: |-
if (strcmp(x.c_str(), id(lastclick_global).c_str()) != 0) { if (strcmp(x.c_str(), id(lastclick_general_global).c_str()) != 0) {
return x; return x;
} else { } else {
return {}; return {};
@@ -791,20 +791,20 @@ text_sensor:
on_value: on_value:
then: then:
- globals.set: - globals.set:
id: lastclick_global id: lastclick_general_global
value: !lambda return x; value: !lambda return x;
##### last click lightsettings page, the main action variable - push to HA ##### ##### last click lightsettings page, the main action variable - push to HA #####
- platform: nextion - platform: nextion
nextion_id: disp1 nextion_id: disp1
name: ${device_name} last click lightsettings name: ${device_name} last click lightsettings
id: disp1_last_click_lightsettings id: disp1_lastclick_lightsettings
update_interval: 50ms update_interval: 50ms
component_name: lightsetting component_name: lightsetting
internal: false internal: false
filters: filters:
- lambda: |- - lambda: |-
if (strcmp(x.c_str(), id(last_click_lightsettings).c_str()) != 0) { if (strcmp(x.c_str(), id(lastclick_lightsettings_global).c_str()) != 0) {
return x; return x;
} else { } else {
return {}; return {};
@@ -812,20 +812,20 @@ text_sensor:
on_value: on_value:
then: then:
- globals.set: - globals.set:
id: last_click_lightsettings id: lastclick_lightsettings_global
value: !lambda return x; value: !lambda return x;
##### last click coversettings page, the main action variable - push to HA ##### ##### last click coversettings page, the main action variable - push to HA #####
- platform: nextion - platform: nextion
nextion_id: disp1 nextion_id: disp1
name: ${device_name} last click coversettings name: ${device_name} last click coversettings
id: disp1_last_click_coversettings id: disp1_lastclick_coversettings
update_interval: 50ms update_interval: 50ms
component_name: coversetting component_name: coversetting
internal: false internal: false
filters: filters:
- lambda: |- - lambda: |-
if (strcmp(x.c_str(), id(last_click_coversettings).c_str()) != 0) { if (strcmp(x.c_str(), id(lastclick_coversettings_global).c_str()) != 0) {
return x; return x;
} else { } else {
return {}; return {};
@@ -833,20 +833,20 @@ text_sensor:
on_value: on_value:
then: then:
- globals.set: - globals.set:
id: last_click_coversettings id: lastclick_coversettings_global
value: !lambda return x; value: !lambda return x;
##### last click weather page, the main action variable - push to HA ##### ##### last click climate page, the main action variable - push to HA #####
- platform: nextion - platform: nextion
nextion_id: disp1 nextion_id: disp1
name: ${device_name} last click weathersettings name: ${device_name} last click weathersettings
id: disp1_last_click_weathersettings id: disp1_lastclick_climatesettings
update_interval: 50ms update_interval: 50ms
component_name: weathersetting component_name: weathersetting
internal: false internal: false
filters: filters:
- lambda: |- - lambda: |-
if (strcmp(x.c_str(), id(last_click_weathersettings).c_str()) != 0) { if (strcmp(x.c_str(), id(lastclick_climatesettings_global).c_str()) != 0) {
return x; return x;
} else { } else {
return {}; return {};
@@ -854,7 +854,7 @@ text_sensor:
on_value: on_value:
then: then:
- globals.set: - globals.set:
id: last_click_weathersettings id: lastclick_climatesettings_global
value: !lambda return x; value: !lambda return x;
##### HEATING System ICON ##### ##### HEATING System ICON #####