diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index a59509c..6a48244 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -32,7 +32,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l 🎉 Roadmap Roadmap can be found here [Roadmap](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap) -ℹ️ Version: v.3.1.0 +ℹ️ Version: v.3.1.1 ' @@ -54,7 +54,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l language: name: Language for NSPanel description: '* *select the language for your NSPanel*' - default: 'EN' + default: 'ENG' selector: select: mode: dropdown @@ -256,6 +256,16 @@ The goal was to create a version that allows everyone to use the NSpanel fully l text: {} ##### HARDWARE BUTTONS ##### + hold_delay: + name: Delay for HW-Button hold in seconds + description: '* *Time in seconds to detect a hold*' + default: 1.0 + selector: + number: + min: 1.0 + max: 10.0 + step: 1.0 + unit_of_measurement: seconds left_button_entity: name: Left Button (Optional) description: '* *Left Hardware Button - Select the entity that should be switched*' @@ -285,6 +295,21 @@ The goal was to create a version that allows everyone to use the NSpanel fully l description: '* *activate this to use left button to toggle relay 1 if display is offline* ' selector: boolean: + left_button_hold_select: + name: Left button hold assignment (Optional) + description: '* *select what shold happen on hold*' + default: 'Default' + selector: + select: + options: + - Default + - Custom Action + left_button_hold_custom_action: + name: Left button custom hold action (Optional) + description: '* The action(s) to launch on hold**' + default: [] + selector: + action: right_button_entity: name: Right Button (Optional) description: '* *Right Hardware Button - Select the entity that should be switched*' @@ -314,6 +339,21 @@ The goal was to create a version that allows everyone to use the NSpanel fully l description: '* *activate this to use right button to toggle relay 2 if display is offline* ' selector: boolean: + right_button_hold_select: + name: Right button hold assignment (Optional) + description: '* *select what shold happen on hold*' + default: 'Default' + selector: + select: + options: + - Default + - Custom Action + right_button_hold_custom_action: + name: Right button custom hold action (Optional) + description: '* The action(s) to launch on hold**' + default: [] + selector: + action: ##### BUTTON Page Labels ##### button_page01_label: @@ -347,7 +387,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l ##### BUTTONS ##### entity01: name: Button 01 (Optional) - description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -364,6 +404,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity01_name: name: Name "Button 01" (Optional) description: '* *Button label - 10 characters are supported*' @@ -378,7 +419,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity02: name: Button 02 (Optional) - description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -395,6 +436,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity02_name: name: Name "Button 02" (Optional) description: '* *Button label - 10 characters are supported*' @@ -409,7 +451,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity03: name: Button 03 (Optional) - description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -426,6 +468,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity03_name: name: Name "Button 03" (Optional) description: '* *Button label - 10 characters are supported*' @@ -440,7 +483,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity04: name: Button 04 (Optional) - description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -457,6 +500,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity04_name: name: Name "Button 04" (Optional) description: '* *Button label - 10 characters are supported*' @@ -471,7 +515,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity05: name: Button 05 (Optional) - description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -488,6 +532,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity05_name: name: Name "Button 05" (Optional) description: '* *Button label - 10 characters are supported*' @@ -502,7 +547,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity06: name: Button 06 (Optional) - description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -519,6 +564,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity06_name: name: Name "Button 06" (Optional) description: '* *Button label - 10 characters are supported*' @@ -533,7 +579,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity07: name: Button 07 (Optional) - description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -550,6 +596,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity07_name: name: Name "Button 07" (Optional) description: '* *Button label - 10 characters are supported*' @@ -564,7 +611,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity08: name: Button 08 (Optional) - description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 1"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -581,6 +628,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity08_name: name: Name "Button 08" (Optional) description: '* *Button label - 10 characters are supported*' @@ -595,7 +643,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity09: name: Button 09 (Optional) - description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -612,6 +660,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity09_name: name: Name "Button 09" (Optional) description: '* *Button label - 10 characters are supported*' @@ -626,7 +675,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity10: name: Button 10 (Optional) - description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -643,6 +692,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity10_name: name: Name "Button 10" (Optional) description: '* *Button label - 10 characters are supported*' @@ -657,7 +707,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity11: name: Button 11 (Optional) - description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -674,6 +724,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity11_name: name: Name "Button 11" (Optional) description: '* *Button label - 10 characters are supported*' @@ -688,7 +739,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity12: name: Button 12 (Optional) - description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -705,6 +756,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity12_name: name: Name "Button 12" (Optional) description: '* *Button label - 10 characters are supported*' @@ -719,7 +771,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity13: name: Button 13 (Optional) - description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -736,6 +788,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity13_name: name: Name "Button 13" (Optional) description: '* *Button label - 10 characters are supported*' @@ -750,7 +803,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity14: name: Button 14 (Optional) - description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -767,6 +820,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity14_name: name: Name "Button 14" (Optional) description: '* *Button label - 10 characters are supported*' @@ -781,7 +835,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity15: name: Button 15 (Optional) - description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -798,6 +852,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity15_name: name: Name "Button 15" (Optional) description: '* *Button label - 10 characters are supported*' @@ -812,7 +867,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity16: name: Button 16 (Optional) - description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 2"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -829,6 +884,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity16_name: name: Name "Button 16" (Optional) description: '* *Button label - 10 characters are supported*' @@ -843,7 +899,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity17: name: Button 17 (Optional) - description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -860,6 +916,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity17_name: name: Name "Button 17" (Optional) description: '* *Button label - 10 characters are supported*' @@ -874,7 +931,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity18: name: Button 18 (Optional) - description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -891,6 +948,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity18_name: name: Name "Button 18" (Optional) description: '* *Button label - 10 characters are supported*' @@ -905,7 +963,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity19: name: Button 19 (Optional) - description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -922,6 +980,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity19_name: name: Name "Button 19" (Optional) description: '* *Button label - 10 characters are supported*' @@ -936,7 +995,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity20: name: Button 20 (Optional) - description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -953,6 +1012,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity20_name: name: Name "Button 20" (Optional) description: '* *Button label - 10 characters are supported*' @@ -967,7 +1027,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity21: name: Button 21 (Optional) - description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -984,6 +1044,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity21_name: name: Name "Button 21" (Optional) description: '* *Button label - 10 characters are supported*' @@ -998,7 +1059,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity22: name: Button 22 (Optional) - description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1015,6 +1076,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity22_name: name: Name "Button 22" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1029,7 +1091,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity23: name: Button 23 (Optional) - description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1046,6 +1108,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity23_name: name: Name "Button 23" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1060,7 +1123,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity24: name: Button 24 (Optional) - description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 3"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1077,6 +1140,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity24_name: name: Name "Button 24" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1091,7 +1155,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity25: name: Button 25 (Optional) - description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1108,6 +1172,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity25_name: name: Name "Button 25" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1122,7 +1187,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity26: name: Button 26 (Optional) - description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1139,6 +1204,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity26_name: name: Name "Button 26" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1153,7 +1219,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity27: name: Button 27 (Optional) - description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1170,6 +1236,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity27_name: name: Name "Button 27" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1184,7 +1251,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity28: name: Button 28 (Optional) - description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1201,6 +1268,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity28_name: name: Name "Button 28" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1215,7 +1283,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity29: name: Button 29 (Optional) - description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1232,6 +1300,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity29_name: name: Name "Button 29" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1246,7 +1315,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity30: name: Button 30 (Optional) - description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1263,6 +1332,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity30_name: name: Name "Button 30" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1277,7 +1347,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity31: name: Button 31 (Optional) - description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1294,6 +1364,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity31_name: name: Name "Button 31" (Optional) description: '* *Button label - 10 characters are supported*' @@ -1308,7 +1379,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l boolean: entity32: name: Button 32 (Optional) - description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan)*' + description: '* *Displayed on **"Button Page 4"** - (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | person | script | binary_sensor | fan | climate)*' default: [] selector: entity: @@ -1325,6 +1396,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l - script - binary_sensor - fan + - climate entity32_name: name: Name "Button 32" (Optional) description: '* *Button label - 10 characters are supported*' @@ -2001,28 +2073,29 @@ trace: ############################################################# trigger_variables: - nspanel_name_trigger: !input "nspanel_name" - last_click: "sensor.{{ nspanel_name_trigger }}_last_click" - last_click_lightsettings: "sensor.{{ nspanel_name_trigger }}_last_click_lightsettings" - last_click_coversettings: "sensor.{{ nspanel_name_trigger }}_last_click_coversettings" - last_click_climatesettings: "sensor.{{ nspanel_name_trigger }}_last_click_climatesettings" - left_button: "binary_sensor.{{ nspanel_name_trigger }}_left_button" - right_button: "binary_sensor.{{ nspanel_name_trigger }}_right_button" - weather_forcast_button: "binary_sensor.{{ nspanel_name_trigger }}_weather_forcast" - nextion_inited_trigger: "switch.{{ nspanel_name_trigger }}_nextion_inited" - # current_page: "sensor.{{ nspanel_name_trigger }}_current_page" - current_page: "sensor.{{ nspanel_name_trigger }}_currentpage" + nspanel_name: !input "nspanel_name" + last_click: "sensor.{{ nspanel_name }}_last_click" + last_click_lightsettings: "sensor.{{ nspanel_name }}_last_click_lightsettings" + last_click_coversettings: "sensor.{{ nspanel_name }}_last_click_coversettings" + last_click_climatesettings: "sensor.{{ nspanel_name }}_last_click_climatesettings" + left_button: "binary_sensor.{{ nspanel_name }}_left_button" + right_button: "binary_sensor.{{ nspanel_name }}_right_button" + weather_forcast_button: "binary_sensor.{{ nspanel_name }}_weather_forcast" + nextion_inited_trigger: "switch.{{ nspanel_name }}_nextion_inited" + # current_page: "sensor.{{ nspanel_name }}_current_page" + current_page: "sensor.{{ nspanel_name }}_currentpage" hotwatercharge: !input "hotwatercharge" heatingsystemflame: !input "heatingsystemflame" - display_target_temperature: "sensor.{{ nspanel_name_trigger }}_display_target_temperature" - relay01_entity: "switch.{{ nspanel_name_trigger }}_relay_1" - relay02_entity: "switch.{{ nspanel_name_trigger }}_relay_2" - nspaneltemp: "sensor.{{ nspanel_name_trigger }}_temperature" + display_target_temperature: "sensor.{{ nspanel_name }}_display_target_temperature" + relay01_entity: "switch.{{ nspanel_name }}_relay_1" + relay02_entity: "switch.{{ nspanel_name }}_relay_2" + nspaneltemp: "sensor.{{ nspanel_name }}_temperature" + settings_entity: "sensor.{{ nspanel_name }}_settings_entity" ##### notification Trigger ##### - notification_unread: "switch.{{ nspanel_name_trigger }}_notification_unread" - notification_text: "sensor.{{ nspanel_name_trigger }}_notification_text" - notification_label: "sensor.{{ nspanel_name_trigger }}_notification_label" + notification_unread: "switch.{{ nspanel_name }}_notification_unread" + notification_text: "sensor.{{ nspanel_name }}_notification_text" + notification_label: "sensor.{{ nspanel_name }}_notification_label" ##### WEATHER Trigger ##### weather: !input "weather" @@ -2031,13 +2104,12 @@ trigger_variables: variables: ##### GENERAL ##### - blueprint_version: "3.1.0" - nspanel_name: !input "nspanel_name" + blueprint_version: "3.1.1" time: "{{ (as_timestamp(now()) | timestamp_custom('%H:%M')) }}" language: !input "language" - notification_sound: "switch.{{ nspanel_name_trigger }}_notification_sound" - confirmation_message: "switch.{{ nspanel_name_trigger }}_confirmation_message" + notification_sound: "switch.{{ nspanel_name }}_notification_sound" + confirmation_message: "switch.{{ nspanel_name }}_confirmation_message" ##### PUSH TO NEXTION DISPLAY ##### command_text_printf: "esphome.{{ nspanel_name }}_send_command_text_printf" @@ -2049,6 +2121,7 @@ variables: command_notification_show: "esphome.{{ nspanel_name }}_notification_show" command_notification_clear: "esphome.{{ nspanel_name }}_notification_clear" command_play_rtttl: "esphome.{{ nspanel_name }}_play_rtttl" + command_set_settings_entity: "esphome.{{ nspanel_name }}_set_settings_entity" ###### SYNC SETTINGS ##### delay_boot: !input "delay" @@ -2079,6 +2152,8 @@ variables: left_button_name: !input "left_button_name" right_button_entity: !input "right_button_entity" right_button_name: !input "right_button_name" + left_button_hold_select: !input "left_button_hold_select" + right_button_hold_select: !input "right_button_hold_select" ##### NEXTION PIC MAPPING ##### button_light_off: "62" @@ -2101,6 +2176,8 @@ variables: button_binary_sensor_on: '108' button_fan_off: "121" button_fan_on: "122" + button_climate_off: "121" + button_climate_on: "122" hardware_button_pic_off: "98" hardware_button_pic_on: "99" @@ -2883,8 +2960,17 @@ trigger: ##### Reboot - Trigger "nspanel_boot_init" ##### - platform: template value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + for: + seconds: 1 id: nspanel_boot_init + ##### settings_entity - Trigger "settings_entity" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ settings_entity }}" + id: settings_entity + ##### Automation reload - platform: event event_type: automation_reloaded @@ -3271,122 +3357,28 @@ trigger: ############################################################# ##### START - Action ##### ############################################################# - +#condition: '{{ states(relay01_entity) != "unavailable" and states(relay02_entity) != "unavailable" }}' +condition: '{{ states(nextion_inited_trigger) == "on" }}' action: - variables: - ##### Entity - Page Lightsettings ##### + #settings_entity_value: '{{ states(settings_entity) }}' + settings_entity_value: >- + {%- if states(settings_entity) != "unavailable" -%} {{ states(settings_entity) }} + {%- else -%} unknown + {%- endif -%} entity_long: >- - {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ entity01 }} - {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ entity02 }} - {%- elif states(last_click) == "pressbuttonpage01button03" -%} {{ entity03 }} - {%- elif states(last_click) == "pressbuttonpage01button04" -%} {{ entity04 }} - {%- elif states(last_click) == "pressbuttonpage01button05" -%} {{ entity05 }} - {%- elif states(last_click) == "pressbuttonpage01button06" -%} {{ entity06 }} - {%- elif states(last_click) == "pressbuttonpage01button07" -%} {{ entity07 }} - {%- elif states(last_click) == "pressbuttonpage01button08" -%} {{ entity08 }} - {%- elif states(last_click) == "pressbuttonpage02button01" -%} {{ entity09 }} - {%- elif states(last_click) == "pressbuttonpage02button02" -%} {{ entity10 }} - {%- elif states(last_click) == "pressbuttonpage02button03" -%} {{ entity11 }} - {%- elif states(last_click) == "pressbuttonpage02button04" -%} {{ entity12 }} - {%- elif states(last_click) == "pressbuttonpage02button05" -%} {{ entity13 }} - {%- elif states(last_click) == "pressbuttonpage02button06" -%} {{ entity14 }} - {%- elif states(last_click) == "pressbuttonpage02button07" -%} {{ entity15 }} - {%- elif states(last_click) == "pressbuttonpage02button08" -%} {{ entity16 }} - {%- elif states(last_click) == "pressbuttonpage03button01" -%} {{ entity17 }} - {%- elif states(last_click) == "pressbuttonpage03button02" -%} {{ entity18 }} - {%- elif states(last_click) == "pressbuttonpage03button03" -%} {{ entity19 }} - {%- elif states(last_click) == "pressbuttonpage03button04" -%} {{ entity20 }} - {%- elif states(last_click) == "pressbuttonpage03button05" -%} {{ entity21 }} - {%- elif states(last_click) == "pressbuttonpage03button06" -%} {{ entity22 }} - {%- elif states(last_click) == "pressbuttonpage03button07" -%} {{ entity23 }} - {%- elif states(last_click) == "pressbuttonpage03button08" -%} {{ entity24 }} - {%- elif states(last_click) == "pressbuttonpage04button01" -%} {{ entity25 }} - {%- elif states(last_click) == "pressbuttonpage04button02" -%} {{ entity26 }} - {%- elif states(last_click) == "pressbuttonpage04button03" -%} {{ entity27 }} - {%- elif states(last_click) == "pressbuttonpage04button04" -%} {{ entity28 }} - {%- elif states(last_click) == "pressbuttonpage04button05" -%} {{ entity29 }} - {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ entity30 }} - {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ entity31 }} - {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32 }} - {%- elif states(last_click) == "pressbuttonleft" -%} {{ left_button_entity }} - {%- elif states(last_click) == "pressbuttonright" -%} {{ right_button_entity }} + {%- if settings_entity_value != "unknown" -%} {{ settings_entity_value.split(',')[0] }} + {%- else -%} unknown {%- 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 }} - {%- elif states(last_click) == "pressbuttonleft" -%} {{ left_button_name }} - {%- elif states(last_click) == "pressbuttonright" -%} {{ right_button_name }} + {%- if settings_entity_value != "unknown" -%} {{ settings_entity_value.split(',')[2] }} + {%- else -%} unknown + {%- endif -%} + entity_back: >- + {%- if settings_entity_value != "unknown" -%} {{ settings_entity_value.split(',')[1] }} + {%- else -%} unknown {%- endif -%} - ##### Entity - Page Lightsettings - Skip Back ##### - entity_back: >- - {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage01button03" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage01button04" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage01button05" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage01button06" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage01button07" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage01button08" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage02button01" -%} {{ "page buttonpage02" }} - {%- elif states(last_click) == "pressbuttonpage02button02" -%} {{ "page buttonpage02" }} - {%- elif states(last_click) == "pressbuttonpage02button03" -%} {{ "page buttonpage02" }} - {%- elif states(last_click) == "pressbuttonpage02button04" -%} {{ "page buttonpage02" }} - {%- elif states(last_click) == "pressbuttonpage02button05" -%} {{ "page buttonpage02" }} - {%- elif states(last_click) == "pressbuttonpage02button06" -%} {{ "page buttonpage02" }} - {%- elif states(last_click) == "pressbuttonpage02button07" -%} {{ "page buttonpage02" }} - {%- elif states(last_click) == "pressbuttonpage02button08" -%} {{ "page buttonpage02" }} - {%- elif states(last_click) == "pressbuttonpage03button01" -%} {{ "page buttonpage03" }} - {%- elif states(last_click) == "pressbuttonpage03button02" -%} {{ "page buttonpage03" }} - {%- elif states(last_click) == "pressbuttonpage03button03" -%} {{ "page buttonpage03" }} - {%- elif states(last_click) == "pressbuttonpage03button04" -%} {{ "page buttonpage03" }} - {%- elif states(last_click) == "pressbuttonpage03button05" -%} {{ "page buttonpage03" }} - {%- elif states(last_click) == "pressbuttonpage03button06" -%} {{ "page buttonpage03" }} - {%- elif states(last_click) == "pressbuttonpage03button07" -%} {{ "page buttonpage03" }} - {%- elif states(last_click) == "pressbuttonpage03button08" -%} {{ "page buttonpage03" }} - {%- elif states(last_click) == "pressbuttonpage04button01" -%} {{ "page buttonpage04" }} - {%- elif states(last_click) == "pressbuttonpage04button02" -%} {{ "page buttonpage04" }} - {%- elif states(last_click) == "pressbuttonpage04button03" -%} {{ "page buttonpage04" }} - {%- elif states(last_click) == "pressbuttonpage04button04" -%} {{ "page buttonpage04" }} - {%- elif states(last_click) == "pressbuttonpage04button05" -%} {{ "page buttonpage04" }} - {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ "page buttonpage04" }} - {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ "page buttonpage04" }} - {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ "page buttonpage04" }} - {%- elif states(last_click) == "pressbuttonleft" -%} {{ "page home" }} - {%- elif states(last_click) == "pressbuttonright" -%} {{ "page home" }} - {%- endif -%} ######################################################################################################################## @@ -3546,6 +3538,8 @@ action: {%- elif repeat.item.entity is match "binary_sensor." and states[repeat.item.entity].state == 'off' -%} {{ button_binary_sensor_off }} {%- elif repeat.item.entity is match "fan." and states[repeat.item.entity].state == 'on' -%} {{ button_fan_on }} {%- elif repeat.item.entity is match "fan." and states[repeat.item.entity].state == 'off' -%} {{ button_fan_off }} + {%- elif repeat.item.entity is match "climate." and states[repeat.item.entity].state != 'off' -%} {{ button_climate_on }} + {%- elif repeat.item.entity is match "climate." and states[repeat.item.entity].state == 'off' -%} {{ button_climate_off }} {%- endif -%} # TEXT and BRIGHTNESS Background btn_bg: >- @@ -3554,6 +3548,8 @@ action: {%- elif states[repeat.item.entity].state == 'off' or states[repeat.item.entity].state == 'closed' -%} {{ button_color_2 }} {%- elif repeat.item.entity is match "person." and states[repeat.item.entity].state == 'home' -%} {{ button_color_1 }} {%- elif repeat.item.entity is match "person." and states[repeat.item.entity].state != 'home' -%} {{ button_color_2 }} + {%- elif repeat.item.entity is match "climate." and states[repeat.item.entity].state != 'off' -%} {{ button_color_1 }} + {%- elif repeat.item.entity is match "climate." and states[repeat.item.entity].state == 'off' -%} {{ button_color_2 }} {%- endif -%} # TEXT Font btn_txt_font: >- @@ -3562,6 +3558,8 @@ action: {%- elif states[repeat.item.entity].state == 'off' or states[repeat.item.entity].state == 'closed' -%} {{ button_color_1 }} {%- elif repeat.item.entity is match "person." and states[repeat.item.entity].state == 'home' -%} {{ button_color_2 }} {%- elif repeat.item.entity is match "person." and states[repeat.item.entity].state != 'home' -%} {{ button_color_1 }} + {%- elif repeat.item.entity is match "climate." and states[repeat.item.entity].state != 'off' -%} {{ button_color_2 }} + {%- elif repeat.item.entity is match "climate." and states[repeat.item.entity].state == 'off' -%} {{ button_color_1 }} {%- endif -%} # BRIGHTNESS Font btn_bri_font: "{{ button_color_2 }}" @@ -3570,6 +3568,7 @@ action: btn_bri_txt: >- {%- if repeat.item.entity is match "light." and states(repeat.item.entity) == 'on' and state_attr(repeat.item.entity, "brightness") != None -%} {{ (state_attr(repeat.item.entity, "brightness") | int * 100 /255) | round(0) }}% {%- elif repeat.item.entity is match "cover." and states(repeat.item.entity) == 'open' and state_attr(repeat.item.entity, "current_position") != None -%} {{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}% + {%- elif repeat.item.entity is match "climate." and states(repeat.item.entity) != 'off' and state_attr(repeat.item.entity, "current_temperature") != None -%} {{ (state_attr(repeat.item.entity, "current_temperature") | int) | round(0) }}° {%- else -%} 0 {%- endif -%} @@ -3658,7 +3657,7 @@ action: ##### Update home-buttons on automation-reload only ##### - if: - condition: template - value_template: '{{ states(current_page) == page_home }}' + value_template: '{{ trigger.id == "automation_reloaded" and states(current_page) == page_home }}' then: ###### QR Code - Icon ###### - if: @@ -3694,10 +3693,34 @@ action: data: cmd: "homebt06_pic.pic={{ home_button_blank }}" + ##### NSPanel Left Button Name ##### + - if: + - condition: template + value_template: '{{ left_button_name |length > 0 }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.left_bt_text + message: "{{ left_button_name }}" + + ##### NSPanel Right Button Name ##### + - if: + - condition: template + value_template: '{{ right_button_name |length > 0 }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.right_bt_text + message: "{{ right_button_name }}" + ##### NSPanel boot init only ##### - if: - condition: template - value_template: '{{ trigger.id == "nspanel_boot_init" }}' + value_template: '{{ trigger.id == "nspanel_boot_init" and states(current_page) != page_home }}' then: ###### INIT Notify ###### - service: "{{ command_notification_clear }}" @@ -3971,6 +3994,8 @@ action: {%- elif trigger.to_state.entity_id is match "binary_sensor." and trigger.to_state.state == 'off' -%} {{ button_binary_sensor_off }} {%- elif trigger.to_state.entity_id is match "fan." and trigger.to_state.state == 'on' -%} {{ button_fan_on }} {%- elif trigger.to_state.entity_id is match "fan." and trigger.to_state.state == 'off' -%} {{ button_fan_off }} + {%- elif trigger.to_state.entity_id is match "climate." and trigger.to_state.state != 'off' -%} {{ button_climate_on }} + {%- elif trigger.to_state.entity_id is match "climate." and trigger.to_state.state == 'off' -%} {{ button_climate_off }} {%- endif -%} # TEXT and BRIGHTNESS Background btn_bg: >- @@ -3979,6 +4004,8 @@ action: {%- elif trigger.to_state.state == 'off' or trigger.to_state.state == 'closed' -%} {{ button_color_2 }} {%- elif trigger.to_state.entity_id is match "person." and trigger.to_state.state == 'home' -%} {{ button_color_1 }} {%- elif trigger.to_state.entity_id is match "person." and trigger.to_state.state != 'home' -%} {{ button_color_2 }} + {%- elif trigger.to_state.entity_id is match "climate." and trigger.to_state.state != 'off' -%} {{ button_color_1 }} + {%- elif trigger.to_state.entity_id is match "climate." and trigger.to_state.state == 'off' -%} {{ button_color_2 }} {%- endif -%} # TEXT Font btn_txt_font: >- @@ -3987,6 +4014,8 @@ action: {%- elif trigger.to_state.state == 'off' or trigger.to_state.state == 'closed' -%} {{ button_color_1 }} {%- elif trigger.to_state.entity_id is match "person." and trigger.to_state.state == 'home' -%} {{ button_color_2 }} {%- elif trigger.to_state.entity_id is match "person." and trigger.to_state.state != 'home' -%} {{ button_color_1 }} + {%- elif trigger.to_state.entity_id is match "climate." and trigger.to_state.state != 'off' -%} {{ button_color_2 }} + {%- elif trigger.to_state.entity_id is match "climate." and trigger.to_state.state == 'off' -%} {{ button_color_1 }} {%- endif -%} # BRIGHTNESS Font btn_bri_font: "{{ button_color_2 }}" @@ -4028,6 +4057,7 @@ action: btn_bri_txt: >- {%- if trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'on' and trigger.to_state.attributes.brightness is defined -%} {{ (trigger.to_state.attributes.brightness | int * 100 /255) | round(0) }}% {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'open' and trigger.to_state.attributes.current_position is defined -%} {{ (trigger.to_state.attributes.current_position | int) | round(0) }}% + {%- elif trigger.to_state.entity_id is match "climate." and trigger.to_state.state != 'off' and trigger.to_state.attributes.current_temperature is defined -%} {{ (trigger.to_state.attributes.current_temperature | int) | round(0) }}° {%- else -%} 0 {%- endif -%} @@ -4145,7 +4175,8 @@ action: ##### LIGHTSETTINGS PAGE - LIGHT Entity ##### - conditions: - condition: template - value_template: '{{ entity_long is match "light." }}' + # value_template: '{{ entity_long is match "light." }}' TODO + value_template: '{{ states(current_page) == page_lightsettings }}' sequence: - choose: ##### LIGHT ON / OFF @@ -4265,7 +4296,8 @@ action: ##### COVERSETTINGS PAGE - COVER Entity ##### - conditions: - condition: template - value_template: '{{ entity_long is match "cover." }}' + # value_template: '{{ entity_long is match "cover." }}' TODO + value_template: '{{ states(current_page) == page_coversettings }}' sequence: ##### COVER OPEN ##### - choose: @@ -4418,6 +4450,22 @@ action: {%- endif -%} - condition: template value_template: '{{ entity_short |length > 0 and entity_short is not match "person." and entity_short is not match "binary_sensor." }}' + - if: + - condition: template + value_template: '{{ entity_short is match "climate." }}' + then: + - variables: + entity_long: '{{ entity_short }}' + entity_long_name: >- + {%- if states(entity_short) == 'unavailable' -%} {{ entity_short }} + {%- else -%} {{ state_attr(entity_short, "friendly_name")| default('no name') }} + {%- endif -%} + entity_back: '{{ states(current_page) }}' + - service: '{{ command_set_settings_entity }}' + data: + entity: '{{ entity_long }},{{ entity_back }},{{ entity_long_name }}' + - condition: template + value_template: '{{ entity_short is not match "climate." }}' - if: - condition: template value_template: "{{ entity_confirm }}" @@ -4538,179 +4586,85 @@ action: - condition: trigger id: long_press sequence: - - choose: - ##### LONG Press - LIGHT Entity ##### - - conditions: - - condition: template - value_template: '{{ entity_long is match "light." }}' - sequence: - ##### LIGHT Generel Values ##### - - service: "{{ command_printf }}" - data: - cmd: page lightsettings - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_name - message: '{{ entity_long_name }}' - - delay: - milliseconds: "{{ delay_value }}" - - if: - - condition: template - value_template: "{{ state_attr(entity_long, 'brightness') != none }}" - then: - - service: "{{ command_value }}" - data: - component: lightsettings.lightslider - message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value - message: '{{ (state_attr(entity_long, "brightness") | int * 100 /255) | round(0) }}%' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value_2 - message: '{{ (state_attr(entity_long, "brightness") | int * 100 /255) | round(0) }}%' - else: - - service: "{{ command_value }}" - data: - component: lightsettings.lightslider - message: '0' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value - message: '0 %' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value_2 - message: '0 %' - - ##### LIGHT Check Color_Temp Value is available when yes send some current Values ##### - - if: - - condition: template - value_template: "{{ state_attr(entity_long, 'color_temp') != none }}" - then: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: lightsettings.temp_value - message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: lightsettings.temp_value_2 - message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_value }}" - data: - component: lightsettings.tempslider - message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' - - ##### LIGHT ON / OFF ##### - - choose: - ##### LIGHT PIC - ON ##### - - conditions: - - condition: template - value_template: '{{ states(entity_long) == "on" }}' - sequence: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: lightsettings.light_status.pic={{ light_pic_on }} - - ##### LIGHT PIC - OFF ##### - - conditions: - - condition: template - value_template: '{{ states(entity_long) == "off" }}' - sequence: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: lightsettings.light_status.pic={{ light_pic_off }} - - ##### LONG Press - COVER Entity ##### - - conditions: - - condition: template - value_template: '{{ entity_long is match "cover." }}' - sequence: - ##### COVER Generel Values ##### - - service: "{{ command_printf }}" - data: - cmd: page coversettings - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_value }}" - data: - component: coversettings.coverslider - message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: coversettings.cover_value - message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: coversettings.cover_name - message: '{{ entity_long_name }}' - - ##### COVER Battery ICON Yes / NO ##### - - if: - - condition: template - value_template: "{{ state_attr(entity_long, 'battery') != none }}" - then: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: coversettings.battery_value - message: '{{ (state_attr(entity_long, "battery") | int ) |round(0) }} %' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: coversettings.battery_icon.pic={{ battery_icon }} + - variables: + ##### Long Press Entity ##### + entity_long: >- + {%- if trigger.to_state.state == "pressbuttonpage01button01" -%} {{ entity01 }} + {%- elif trigger.to_state.state == "pressbuttonpage01button02" -%} {{ entity02 }} + {%- elif trigger.to_state.state == "pressbuttonpage01button03" -%} {{ entity03 }} + {%- elif trigger.to_state.state == "pressbuttonpage01button04" -%} {{ entity04 }} + {%- elif trigger.to_state.state == "pressbuttonpage01button05" -%} {{ entity05 }} + {%- elif trigger.to_state.state == "pressbuttonpage01button06" -%} {{ entity06 }} + {%- elif trigger.to_state.state == "pressbuttonpage01button07" -%} {{ entity07 }} + {%- elif trigger.to_state.state == "pressbuttonpage01button08" -%} {{ entity08 }} + {%- elif trigger.to_state.state == "pressbuttonpage02button01" -%} {{ entity09 }} + {%- elif trigger.to_state.state == "pressbuttonpage02button02" -%} {{ entity10 }} + {%- elif trigger.to_state.state == "pressbuttonpage02button03" -%} {{ entity11 }} + {%- elif trigger.to_state.state == "pressbuttonpage02button04" -%} {{ entity12 }} + {%- elif trigger.to_state.state == "pressbuttonpage02button05" -%} {{ entity13 }} + {%- elif trigger.to_state.state == "pressbuttonpage02button06" -%} {{ entity14 }} + {%- elif trigger.to_state.state == "pressbuttonpage02button07" -%} {{ entity15 }} + {%- elif trigger.to_state.state == "pressbuttonpage02button08" -%} {{ entity16 }} + {%- elif trigger.to_state.state == "pressbuttonpage03button01" -%} {{ entity17 }} + {%- elif trigger.to_state.state == "pressbuttonpage03button02" -%} {{ entity18 }} + {%- elif trigger.to_state.state == "pressbuttonpage03button03" -%} {{ entity19 }} + {%- elif trigger.to_state.state == "pressbuttonpage03button04" -%} {{ entity20 }} + {%- elif trigger.to_state.state == "pressbuttonpage03button05" -%} {{ entity21 }} + {%- elif trigger.to_state.state == "pressbuttonpage03button06" -%} {{ entity22 }} + {%- elif trigger.to_state.state == "pressbuttonpage03button07" -%} {{ entity23 }} + {%- elif trigger.to_state.state == "pressbuttonpage03button08" -%} {{ entity24 }} + {%- elif trigger.to_state.state == "pressbuttonpage04button01" -%} {{ entity25 }} + {%- elif trigger.to_state.state == "pressbuttonpage04button02" -%} {{ entity26 }} + {%- elif trigger.to_state.state == "pressbuttonpage04button03" -%} {{ entity27 }} + {%- elif trigger.to_state.state == "pressbuttonpage04button04" -%} {{ entity28 }} + {%- elif trigger.to_state.state == "pressbuttonpage04button05" -%} {{ entity29 }} + {%- elif trigger.to_state.state == "pressbuttonpage04button06" -%} {{ entity30 }} + {%- elif trigger.to_state.state == "pressbuttonpage04button07" -%} {{ entity31 }} + {%- elif trigger.to_state.state == "pressbuttonpage04button08" -%} {{ entity32 }} + {%- endif -%} - ##### COVER OPEN / CLOSE - - choose: - ##### COVER PIC - open ##### - - conditions: - - condition: template - value_template: '{{ states(entity_long) == "open" }}' - sequence: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: coversettings.cover_status.pic={{ cover_pic_open }} - - ##### COVER PIC - Closed - - conditions: - - condition: template - value_template: '{{ states(entity_long) == "closed" }}' - sequence: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: coversettings.cover_status.pic={{ cover_pic_closed }} - + ##### Long Press Entity Name ##### + entity_long_name: >- + {%- if trigger.to_state.state == "pressbuttonpage01button01" -%} {{ entity01_name }} + {%- elif trigger.to_state.state == "pressbuttonpage01button02" -%} {{ entity02_name }} + {%- elif trigger.to_state.state == "pressbuttonpage01button03" -%} {{ entity03_name }} + {%- elif trigger.to_state.state == "pressbuttonpage01button04" -%} {{ entity04_name }} + {%- elif trigger.to_state.state == "pressbuttonpage01button05" -%} {{ entity05_name }} + {%- elif trigger.to_state.state == "pressbuttonpage01button06" -%} {{ entity06_name }} + {%- elif trigger.to_state.state == "pressbuttonpage01button07" -%} {{ entity07_name }} + {%- elif trigger.to_state.state == "pressbuttonpage01button08" -%} {{ entity08_name }} + {%- elif trigger.to_state.state == "pressbuttonpage02button01" -%} {{ entity09_name }} + {%- elif trigger.to_state.state == "pressbuttonpage02button02" -%} {{ entity10_name }} + {%- elif trigger.to_state.state == "pressbuttonpage02button03" -%} {{ entity11_name }} + {%- elif trigger.to_state.state == "pressbuttonpage02button04" -%} {{ entity12_name }} + {%- elif trigger.to_state.state == "pressbuttonpage02button05" -%} {{ entity13_name }} + {%- elif trigger.to_state.state == "pressbuttonpage02button06" -%} {{ entity14_name }} + {%- elif trigger.to_state.state == "pressbuttonpage02button07" -%} {{ entity15_name }} + {%- elif trigger.to_state.state == "pressbuttonpage02button08" -%} {{ entity16_name }} + {%- elif trigger.to_state.state == "pressbuttonpage03button01" -%} {{ entity17_name }} + {%- elif trigger.to_state.state == "pressbuttonpage03button02" -%} {{ entity18_name }} + {%- elif trigger.to_state.state == "pressbuttonpage03button03" -%} {{ entity19_name }} + {%- elif trigger.to_state.state == "pressbuttonpage03button04" -%} {{ entity20_name }} + {%- elif trigger.to_state.state == "pressbuttonpage03button05" -%} {{ entity21_name }} + {%- elif trigger.to_state.state == "pressbuttonpage03button06" -%} {{ entity22_name }} + {%- elif trigger.to_state.state == "pressbuttonpage03button07" -%} {{ entity23_name }} + {%- elif trigger.to_state.state == "pressbuttonpage03button08" -%} {{ entity24_name }} + {%- elif trigger.to_state.state == "pressbuttonpage04button01" -%} {{ entity25_name }} + {%- elif trigger.to_state.state == "pressbuttonpage04button02" -%} {{ entity26_name }} + {%- elif trigger.to_state.state == "pressbuttonpage04button03" -%} {{ entity27_name }} + {%- elif trigger.to_state.state == "pressbuttonpage04button04" -%} {{ entity28_name }} + {%- elif trigger.to_state.state == "pressbuttonpage04button05" -%} {{ entity29_name }} + {%- elif trigger.to_state.state == "pressbuttonpage04button06" -%} {{ entity30_name }} + {%- elif trigger.to_state.state == "pressbuttonpage04button07" -%} {{ entity31_name }} + {%- elif trigger.to_state.state == "pressbuttonpage04button08" -%} {{ entity32_name }} + {%- endif -%} + + ##### Current Page ##### + entity_back: '{{ states(current_page) }}' + - service: '{{ command_set_settings_entity }}' + data: + entity: '{{ entity_long }},{{ entity_back }},{{ entity_long_name }}' + ##### LASTCLICK_LIGHTSETTINGS - Changes on page Light-Settings ##### - conditions: - condition: trigger @@ -4778,7 +4732,7 @@ action: sequence: - service: "{{ command_printf }}" data: - cmd: "{{ entity_back }}" + cmd: "page {{ entity_back }}" ##### LASTCLICK_COVERSETTINGS - Changes on page Cover-Settings ##### - conditions: @@ -4842,7 +4796,7 @@ action: sequence: - service: "{{ command_printf }}" data: - cmd: "{{ entity_back }}" + cmd: "page {{ entity_back }}" ##### LASTCLICK_CLIMATESETTINGS - Changes on page Climate-Settings ##### - conditions: @@ -4867,11 +4821,11 @@ action: sequence: - if: - condition: template - value_template: '{{ states(climate) == "off" }}' + value_template: '{{ states(entity_long) == "off" }}' then: - service: climate.turn_on ############ data: - entity_id: !input climate + entity_id: '{{ entity_long }}' # - service: climate.set_temperature # data: # entity_id: !input climate @@ -4880,7 +4834,7 @@ action: else: - service: climate.turn_off ############ data: - entity_id: !input climate + entity_id: '{{ entity_long }}' # - service: climate.set_temperature # data: # entity_id: !input climate @@ -4892,11 +4846,11 @@ action: sequence: - if: - condition: template - value_template: '{{ states(climate) != "off" }}' + value_template: '{{ states(entity_long) != "off" }}' then: - if: - condition: template - value_template: '{{ climate_optimistic == true }}' + value_template: '{{ climate_optimistic == true }}' ## TODO - remove from here then: - variables: current_setpoint: "{{states(display_target_temperature) | round(1)}}" @@ -4905,10 +4859,10 @@ action: value: "{{ current_setpoint -0.5 }}" else: - variables: - current_setpoint: "{{state_attr(climate, 'temperature') | round(1)}}" + current_setpoint: "{{state_attr(entity_long, 'temperature') | round(1)}}" - service: climate.set_temperature data: - entity_id: !input climate + entity_id: '{{ entity_long }}' #hvac_mode: 'heat' temperature: "{{ current_setpoint -0.5 }}" @@ -4918,13 +4872,13 @@ action: sequence: - if: - condition: template - value_template: '{{ states(climate) != "off" }}' + value_template: '{{ states(entity_long) != "off" }}' then: - variables: - current_setpoint: "{{state_attr(climate, 'temperature') | round(1)}}" + current_setpoint: "{{state_attr(entity_long, 'temperature') | round(1)}}" - if: - condition: template - value_template: '{{ climate_optimistic == true }}' + value_template: '{{ climate_optimistic == true }}' ## TODO - remove from here then: - variables: current_setpoint: "{{states(display_target_temperature) | round(1)}}" @@ -4933,10 +4887,10 @@ action: value: "{{ current_setpoint +0.5 }}" else: - variables: - current_setpoint: "{{state_attr(climate, 'temperature') | round(1)}}" + current_setpoint: "{{state_attr(entity_long, 'temperature') | round(1)}}" - service: climate.set_temperature data: - entity_id: !input climate + entity_id: '{{ entity_long }}' #hvac_mode: 'heat' temperature: "{{ current_setpoint +0.5 }}" @@ -4946,7 +4900,7 @@ action: sequence: - if: - condition: template - value_template: '{{ states(climate) != "off" }}' + value_template: '{{ states(entity_long) != "off" }}' then: - variables: #climateslider: '{{ trigger.event.data.new_state.state |replace("climateslider","") | int }}' @@ -4983,7 +4937,7 @@ action: {%- endif -%} - if: - condition: template - value_template: '{{ climate_optimistic == true }}' + value_template: '{{ climate_optimistic == true }}' ## TODO - remove from here then: - service: "{{ command_thermostat_cycle }}" data: @@ -4991,41 +4945,75 @@ action: else: - service: climate.set_temperature data: - entity_id: !input climate + entity_id: '{{ entity_long }}' #hvac_mode: 'heat' temperature: "{{ new_setpoint }}" + #### Page Climate - Close Climate Page ##### + - conditions: + - condition: template + value_template: '{{ trigger.event.data.new_state.state == "releaseclimateclose" }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "page {{ entity_back }}" + ##### Left button press ##### - conditions: - condition: trigger - id: left_button_press + id: left_button_press sequence: - - service: >- - {% if left_button_entity is match 'light.' %} - light.toggle - {% elif left_button_entity is match 'switch.' %} - switch.toggle - {% elif left_button_entity is match 'cover.' %} - cover.toggle - {% elif left_button_entity is match 'input_boolean.' %} - input_boolean.toggle - {% elif left_button_entity is match 'automation.' %} - automation.toggle - {% elif left_button_entity is match 'button.' %} - button.press - {% elif left_button_entity is match 'input_button.' %} - input_button.press - {% elif left_button_entity is match 'scene.' %} - scene.turn_on - {% elif left_button_entity is match 'script.' %} - script.turn_on - {% elif left_button_entity is match 'fan.' %} - fan.toggle - {% endif %} - data: - entity_id: "{{ left_button_entity }}" - - delay: - milliseconds: "{{ delay_value }}" + - wait_template: "{{ is_state(left_button, 'off') }}" + timeout: !input hold_delay + continue_on_timeout: true + - if: + - condition: template + value_template: "{{ not wait.completed }}" + then: # Hold + - choose: + - conditions: '{{ left_button_hold_select == "Default" and left_button_entity |length > 0 }}' + sequence: + - variables: + entity_long: '{{ left_button_entity }}' + entity_long_name: >- + {%- if left_button_name |length > 0 -%} {{ left_button_name }} + {%- elif states(left_button_entity) == 'unavailable' -%} {{ left_button_entity }} + {%- else -%} {{ state_attr(left_button_entity, "friendly_name")| default('no name') }} + {%- endif -%} + entity_back: '{{ page_home }}' + - service: '{{ command_set_settings_entity }}' + data: + entity: '{{ entity_long }},{{ entity_back }},{{ entity_long_name }}' + + - conditions: '{{ left_button_hold_select == "Custom Action" }}' + sequence: !input left_button_hold_custom_action + else: # Single Click + - condition: template + value_template: '{{ left_button_entity |length > 0 }}' + - service: >- + {% if left_button_entity is match 'light.' %} + light.toggle + {% elif left_button_entity is match 'switch.' %} + switch.toggle + {% elif left_button_entity is match 'cover.' %} + cover.toggle + {% elif left_button_entity is match 'input_boolean.' %} + input_boolean.toggle + {% elif left_button_entity is match 'automation.' %} + automation.toggle + {% elif left_button_entity is match 'button.' %} + button.press + {% elif left_button_entity is match 'input_button.' %} + input_button.press + {% elif left_button_entity is match 'scene.' %} + scene.turn_on + {% elif left_button_entity is match 'script.' %} + script.turn_on + {% elif left_button_entity is match 'fan.' %} + fan.toggle + {% endif %} + data: + entity_id: "{{ left_button_entity }}" ##### Left button State ##### - conditions: @@ -5050,31 +5038,59 @@ action: - conditions: - condition: trigger id: right_button_press + sequence: - - service: >- - {% if right_button_entity is match 'light.' %} - light.toggle - {% elif right_button_entity is match 'switch.' %} - switch.toggle - {% elif right_button_entity is match 'cover.' %} - cover.toggle - {% elif right_button_entity is match 'input_boolean.' %} - input_boolean.toggle - {% elif right_button_entity is match 'automation.' %} - automation.toggle - {% elif right_button_entity is match 'button.' %} - button.press - {% elif right_button_entity is match 'input_button.' %} - input_button.press - {% elif right_button_entity is match 'scene.' %} - scene.turn_on - {% elif right_button_entity is match 'script.' %} - script.turn_on - {% elif right_button_entity is match 'fan.' %} - fan.toggle - {% endif %} - data: - entity_id: "{{ right_button_entity }}" + - wait_template: "{{ is_state(right_button, 'off') }}" + timeout: !input hold_delay + continue_on_timeout: true + - if: + - condition: template + value_template: "{{ not wait.completed }}" + then: # Hold + - choose: + - conditions: '{{ right_button_hold_select == "Default" and right_button_entity |length > 0 }}' + sequence: + - variables: + entity_long: '{{ right_button_entity }}' + entity_long_name: >- + {%- if right_button_name |length > 0 -%} {{ right_button_name }} + {%- elif states(right_button_entity) == 'unavailable' -%} {{ right_button_entity }} + {%- else -%} {{ state_attr(right_button_entity, "friendly_name")| default('no name') }} + {%- endif -%} + entity_back: '{{ page_home }}' + - service: '{{ command_set_settings_entity }}' + data: + entity: '{{ entity_long }},{{ entity_back }},{{ entity_long_name }}' + + - conditions: '{{ right_button_hold_select == "Custom Action" }}' + sequence: !input right_button_hold_custom_action + else: # Single Click + - condition: template + value_template: '{{ right_button_entity |length > 0 }}' + - service: >- + {% if right_button_entity is match 'light.' %} + light.toggle + {% elif right_button_entity is match 'switch.' %} + switch.toggle + {% elif right_button_entity is match 'cover.' %} + cover.toggle + {% elif right_button_entity is match 'input_boolean.' %} + input_boolean.toggle + {% elif right_button_entity is match 'automation.' %} + automation.toggle + {% elif right_button_entity is match 'button.' %} + button.press + {% elif right_button_entity is match 'input_button.' %} + input_button.press + {% elif right_button_entity is match 'scene.' %} + scene.turn_on + {% elif right_button_entity is match 'script.' %} + script.turn_on + {% elif right_button_entity is match 'fan.' %} + fan.toggle + {% endif %} + data: + entity_id: "{{ right_button_entity }}" ##### Right button State ##### - conditions: @@ -5243,10 +5259,33 @@ action: - condition: trigger id: current_page_changed sequence: + ##### climate-page left - apply climate temperature if climate_optimistic ##### ## TODO - remove from here + - if: + - condition: template + value_template: '{{ trigger.event.data.old_state.state == page_climate }}' + then: + - if: + - condition: template + value_template: '{{ climate_optimistic == true }}' + then: + - variables: + display_target_temperature: "{{states(display_target_temperature) | round(1)}}" + - if: + - condition: template + value_template: '{{ display_target_temperature != 0.0 }}' + then: + - service: climate.set_temperature + data: + entity_id: '{{ entity_long }}' + #hvac_mode: 'heat' + temperature: "{{ display_target_temperature }}" - choose: ## PAGE HOME ## - conditions: '{{ trigger.event.data.new_state.state == page_home }}' sequence: + - service: '{{ command_set_settings_entity }}' + data: + entity: 'unknown' ##### NSPanel Date ##### - delay: milliseconds: "{{ delay_value }}" @@ -5447,27 +5486,6 @@ action: - service: "{{ command_printf }}" data: cmd: home.icon_top_02.pic={{ relay02_pic }} - - ##### climate-page left - apply climate temperature if climate_optimistic ##### - - if: - - condition: template - value_template: '{{ trigger.event.data.old_state.state == page_climate }}' - then: - - if: - - condition: template - value_template: '{{ climate_optimistic == true }}' - then: - - variables: - display_target_temperature: "{{states(display_target_temperature) | round(1)}}" - - if: - - condition: template - value_template: '{{ display_target_temperature != 0.0 }}' - then: - - service: climate.set_temperature - data: - entity_id: !input climate - #hvac_mode: 'heat' - temperature: "{{ display_target_temperature }}" ##### Set notify icon ##### - variables: @@ -6711,7 +6729,7 @@ action: alias: 'climate page' sequence: - variables: - hvac_mode: "{{ states(climate) }}" + hvac_mode: "{{ states(entity_long) }}" outdoor_temp: >- {%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }} {%- elif state_attr(weather_entity, "temperature") != None -%} {{state_attr(weather_entity,"temperature") | round(0)}} @@ -6721,7 +6739,12 @@ action: {%- if hvac_mode == "off" -%} {{ off_mui }} {%- elif hvac_mode != "off" -%} {{ on_mui }} {%- endif -%} - + - service: "{{ command_text_printf }}" + data: + component: climate.climate_label + message: '{{ entity_long_name }}' + - delay: + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: outdoor_temp @@ -6729,13 +6752,13 @@ action: - service: "{{ command_text_printf }}" data: component: current_temp - message: "{{state_attr(climate, 'current_temperature') | round(1)}}°" + message: "{{state_attr(entity_long, 'current_temperature') | round(1)}}°" - if: condition: template value_template: '{{ hvac_mode != "off" }}' then: - variables: - target_temp: "{{state_attr(climate, 'temperature') | round(1)}}" + target_temp: "{{state_attr(entity_long, 'temperature') | round(1)}}" - service: "{{ command_thermostat_cycle }}" data: value: "{{target_temp}}" @@ -6798,14 +6821,165 @@ action: ## PAGE LIGHTSETTUNGS ## - conditions: '{{ trigger.event.data.new_state.state == page_lightsettings }}' sequence: + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_name + message: '{{ entity_long_name }}' + - delay: + milliseconds: "{{ delay_value }}" + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'brightness') != none }}" + then: + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ (state_attr(entity_long, "brightness") | int * 100 /255) | round(0) }}%' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ (state_attr(entity_long, "brightness") | int * 100 /255) | round(0) }}%' + else: + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '0' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '0 %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '0 %' + + ##### LIGHT Check Color_Temp Value is available when yes send some current Values ##### + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'color_temp') != none }}" + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: lightsettings.tempslider + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + + ##### LIGHT ON / OFF ##### + - choose: + ##### LIGHT PIC - ON ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "on" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_on }} + + ##### LIGHT PIC - OFF ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "off" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_off }} ## PAGE COVERSETTINGS ## - conditions: '{{ trigger.event.data.new_state.state == page_coversettings }}' sequence: + - service: "{{ command_value }}" + data: + component: coversettings.coverslider + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_name + message: '{{ entity_long_name }}' + + ##### COVER Battery ICON Yes / NO ##### + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'battery') != none }}" + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.battery_value + message: '{{ (state_attr(entity_long, "battery") | int ) |round(0) }} %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.battery_icon.pic={{ battery_icon }} + + ##### COVER OPEN / CLOSE + - choose: + ##### COVER PIC - open ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "open" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_open }} + + ##### COVER PIC - Closed + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "closed" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_closed }} ## PAGE BUTTONPAGE01 ## - conditions: '{{ trigger.event.data.new_state.state == page_buttonpage01 }}' sequence: + - service: '{{ command_set_settings_entity }}' + data: + entity: 'unknown' ##### Button Page Label ##### - if: - condition: template @@ -6819,6 +6993,9 @@ action: ## PAGE BUTTONPAGE02 ## - conditions: '{{ trigger.event.data.new_state.state == page_buttonpage02 }}' sequence: + - service: '{{ command_set_settings_entity }}' + data: + entity: 'unknown' ##### Button Page Label ##### - if: - condition: template @@ -6832,6 +7009,9 @@ action: ## PAGE BUTTONPAGE03 ## - conditions: '{{ trigger.event.data.new_state.state == page_buttonpage03 }}' sequence: + - service: '{{ command_set_settings_entity }}' + data: + entity: 'unknown' ##### Button Page Label ##### - if: - condition: template @@ -6845,6 +7025,9 @@ action: ## PAGE BUTTONPAGE04 ## - conditions: '{{ trigger.event.data.new_state.state == page_buttonpage04 }}' sequence: + - service: '{{ command_set_settings_entity }}' + data: + entity: 'unknown' ##### Button Page Label ##### - if: - condition: template @@ -7193,9 +7376,16 @@ action: - condition: template value_template: '{{ climate |length > 0 }}' then: - - service: "{{ command_printf }}" + - variables: + entity_long: '{{ climate }}' + entity_long_name: >- + {%- if states(climate) == 'unavailable' -%} {{ climate }} + {%- else -%} {{ state_attr(climate, "friendly_name")| default('no name') }} + {%- endif -%} + entity_back: '{{ page_home }}' + - service: '{{ command_set_settings_entity }}' data: - cmd: "page {{ page_climate }}" + entity: '{{ entity_long }},{{ entity_back }},{{ entity_long_name }}' ##### Set Flame-Symbol ##### - conditions: @@ -7294,7 +7484,7 @@ action: cmd: heating_bt_pic.pic={{ heating_bt_pic }} - if: - condition: template - value_template: '{{ trigger.event.data.new_state.state != "off" }}' + value_template: '{{ trigger.event.data.new_state.state != "off" }}' #### TODO AND->OR (not) not optimistic-mode then: - service: "{{ command_thermostat_cycle }}" data: @@ -7321,6 +7511,29 @@ action: data: cmd: home.icon_top_03.pic={{ top_menu_climate }} + ##### Settings Entity changed -> open settings-page ##### + - conditions: + - condition: trigger + id: settings_entity + - condition: template + value_template: "{{ trigger.event.data.new_state.state != 'unknown' }}" + sequence: + - choose: + - conditions: '{{ entity_long is match "light." }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "page {{ page_lightsettings }}" + - conditions: '{{ entity_long is match "cover." }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "page {{ page_coversettings }}" + - conditions: '{{ entity_long is match "climate." }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "page {{ page_climate }}" ############################################################# diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 6cda307..c178b7d 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -161,7 +161,7 @@ api: - lambda: 'id(disp1).set_component_value(component.c_str(), message);' ##### Service to send a command "hide componente" directly to the display ##### - - service: send_command_hide + - service: send_command_hide ### unused ### variables: component: string then: @@ -170,7 +170,7 @@ api: - lambda: 'id(disp1).hide_component(component.c_str());' ##### Service to send a command "show componente" directly to the display ##### - - service: send_command_show + - service: send_command_show ### unused ### variables: component: string then: @@ -229,6 +229,16 @@ api: id(notification_text).publish_state(""); - switch.turn_off: notification_unread + ##### Service to set entity-information for settings-page(s) + - service: set_settings_entity + variables: + entity: string + then: + - wait_until: + switch.is_on: nextion_init + - lambda: |- + id(settings_entity).publish_state(entity.c_str()); + ##### Service to play a rtttl tones ##### # Example tones : https://codebender.cc/sketch:109888#RTTTL%20Songs.ino - service: play_rtttl @@ -338,18 +348,13 @@ binary_sensor: ###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY##### - platform: gpio - # name: ${device_name} Left Button + name: ${device_name} Left Button id: left_button pin: number: 14 inverted: true on_click: - - min_length: 50ms - max_length: 1000ms then: - - binary_sensor.template.publish: - id: left_button_short - state: ON - if: condition: and: @@ -365,50 +370,17 @@ binary_sensor: switch.is_on: relay_1 then: - lambda: id(disp1).send_command_printf("home.icon_top_01.pic=105"); - - delay: 500ms - - binary_sensor.template.publish: - id: left_button_short - state: OFF - on_press: - then: - - lambda: |- - if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") { - ESP_LOGD("nspanel", "settingspage -> no press"); - } else { - // ESP_LOGD("nspanel", "release button"); - id(disp1_lastclick_general).set_state("pressbuttonleft",true,true); - } - on_release: - then: - - lambda: |- - if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") { - ESP_LOGD("nspanel", "settingspage -> no release"); - } else { - // ESP_LOGD("nspanel", "release button"); - id(disp1_lastclick_general).set_state("releasebuttonleft",true,true); - } - - - platform: template - name: ${device_name} Left Button - id: left_button_short - lambda: |- - return {}; ##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY ##### - platform: gpio - # name: ${device_name} Right Button + name: ${device_name} Right Button id: right_button pin: number: 27 inverted: true on_click: - - min_length: 50ms - max_length: 1000ms then: - - binary_sensor.template.publish: - id: right_button_short - state: ON - if: condition: and: @@ -424,34 +396,6 @@ binary_sensor: switch.is_on: relay_2 then: - lambda: id(disp1).send_command_printf("home.icon_top_02.pic=106"); - - delay: 500ms - - binary_sensor.template.publish: - id: right_button_short - state: OFF - on_press: - then: - - lambda: |- - if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") { - ESP_LOGD("nspanel", "settingspage -> no press"); - } else { - // ESP_LOGD("nspanel", "release button"); - id(disp1_lastclick_general).set_state("pressbuttonright",true,true); - } - on_release: - then: - - lambda: |- - if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") { - ESP_LOGD("nspanel", "settingspage -> no release"); - } else { - // ESP_LOGD("nspanel", "release button"); - id(disp1_lastclick_general).set_state("releasebuttonright",true,true); - } - - - platform: template - name: ${device_name} Right Button - id: right_button_short - lambda: |- - return {}; ##### Restart NSPanel Button - Setting Page ##### - platform: nextion @@ -616,6 +560,10 @@ text_sensor: name: ${device_name} Notification Text id: notification_text + - platform: template + name: ${device_name} Settings Entity + id: settings_entity + ##### last click sensor, the main action variable - push to HA ##### - platform: nextion nextion_id: disp1 @@ -950,11 +898,11 @@ display: on_setup: then: - lambda: id(disp1).send_command_printf("page 8"); - - lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.1.0"); ### esphome-version ### + - lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.1.1"); ### esphome-version ### - wait_until: api.connected - lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str()); - - delay: 0.5s + - delay: 1s - number.set: id: display_brightness value: !lambda 'return id(display_brightness_global);' @@ -967,7 +915,7 @@ display: - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); - lambda: id(disp1).send_command_printf("home.sleepmodus.val=%i", id(sleep_modus_global)); - lambda: id(disp1).set_component_value("settings.a02", id(sleep_modus_global) == 1); - - delay: 0.5s + - delay: 1s - switch.template.publish: id: nextion_init state: on diff --git a/nspanel_eu.tft b/nspanel_eu.tft index 0dbca55..02bc2a1 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ diff --git a/nspanel_us.tft b/nspanel_us.tft index 03c8e88..5d760fb 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ