From f59077f2ac9314149630660ce770aa3ff4cf3f2e Mon Sep 17 00:00:00 2001 From: LuBeDa Date: Sat, 29 Apr 2023 18:41:05 +0200 Subject: [PATCH] samples blueprints --- copy2esphome/EHMTX_easy_delete.yaml | 10 +++++----- copy2esphome/EHMTX_easy_hide.yaml | 1 + copy2esphome/EHMTX_easy_show.yaml | 1 + copy2esphome/EHMTX_easy_state.yaml | 23 ++++++++++++++++++++--- copy2esphome/Ulanzi-simple.yaml | 5 +++-- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/copy2esphome/EHMTX_easy_delete.yaml b/copy2esphome/EHMTX_easy_delete.yaml index d41bcb0..e16d3e9 100644 --- a/copy2esphome/EHMTX_easy_delete.yaml +++ b/copy2esphome/EHMTX_easy_delete.yaml @@ -71,9 +71,9 @@ trigger: entity_id: !input trigger_sensor action: - sequence: - - service: esphome.{{ device_attr(display, "name") }}_del_screen - data: - icon_name: !input icon_name - mode: !input screen_mode + - mode: parallel + - service: esphome.{{ device_attr(display, "name") }}_del_screen + data: + icon_name: !input icon_name + mode: !input screen_mode \ No newline at end of file diff --git a/copy2esphome/EHMTX_easy_hide.yaml b/copy2esphome/EHMTX_easy_hide.yaml index 9853d1a..370ae1e 100644 --- a/copy2esphome/EHMTX_easy_hide.yaml +++ b/copy2esphome/EHMTX_easy_hide.yaml @@ -39,4 +39,5 @@ trigger: entity_id: !input trigger_sensor action: + - mode: parallel - service: esphome.{{ device_attr(display, "name") }}_{{service}} diff --git a/copy2esphome/EHMTX_easy_show.yaml b/copy2esphome/EHMTX_easy_show.yaml index 0ae01dd..7df0cd4 100644 --- a/copy2esphome/EHMTX_easy_show.yaml +++ b/copy2esphome/EHMTX_easy_show.yaml @@ -61,6 +61,7 @@ trigger: - platform: state entity_id: !input trigger_sensor action: + - mode: parallel - if: - condition: template value_template: |- diff --git a/copy2esphome/EHMTX_easy_state.yaml b/copy2esphome/EHMTX_easy_state.yaml index b6b6258..bd2dd05 100644 --- a/copy2esphome/EHMTX_easy_state.yaml +++ b/copy2esphome/EHMTX_easy_state.yaml @@ -15,6 +15,7 @@ blueprint: selector: entity: domain: sensor + multiple: true default_color: name: default text color description: this is the default textcolor for values within the low and the high value @@ -102,6 +103,7 @@ trigger: entity_id: !input trigger_sensor action: + - mode: parallel - if: - condition: template value_template: "{{ not use_colors }}" @@ -136,7 +138,12 @@ action: icon_name: !input icon_name screen_time: !input screen_time lifetime: !input lifetime - text: "{{trigger.to_state.state}} {{trigger.to_state.attributes.unit_of_measurement}}" + text: |- + {% if bfriendly %} + {{trigger.to_state.attributes.friendly_name}}: {{trigger.to_state.state}} {{trigger.to_state.attributes.unit_of_measurement}} + {% else %} + {{trigger.to_state.state}} {{trigger.to_state.attributes.unit_of_measurement}} + {% endif %} default_font: !input default_font r: |- {{ lo_color[0] }} @@ -154,7 +161,12 @@ action: icon_name: !input icon_name screen_time: !input screen_time lifetime: !input lifetime - text: "{{trigger.to_state.state}} {{trigger.to_state.attributes.unit_of_measurement}}" + text: |- + {% if bfriendly %} + {{trigger.to_state.attributes.friendly_name}}: {{trigger.to_state.state}} {{trigger.to_state.attributes.unit_of_measurement}} + {% else %} + {{trigger.to_state.state}} {{trigger.to_state.attributes.unit_of_measurement}} + {% endif %} default_font: !input default_font r: |- {{ hi_color[0] }} @@ -168,7 +180,12 @@ action: icon_name: !input icon_name screen_time: !input screen_time lifetime: !input lifetime - text: "{{trigger.to_state.state}} {{trigger.to_state.attributes.unit_of_measurement}}" + text: |- + {% if bfriendly %} + {{trigger.to_state.attributes.friendly_name}}: {{trigger.to_state.state}} {{trigger.to_state.attributes.unit_of_measurement}} + {% else %} + {{trigger.to_state.state}} {{trigger.to_state.attributes.unit_of_measurement}} + {% endif %} default_font: !input default_font r: |- {{ def_color[0] }} diff --git a/copy2esphome/Ulanzi-simple.yaml b/copy2esphome/Ulanzi-simple.yaml index f12e264..b6553b8 100644 --- a/copy2esphome/Ulanzi-simple.yaml +++ b/copy2esphome/Ulanzi-simple.yaml @@ -202,6 +202,9 @@ ehmtxv2: show_seconds: false default_font_id: default_font special_font_id: default_font # for starters yust one font + + # used in blueprints + # "error","home_assistant","temperature","lightbulb","music","phone","car","sleep8x32" icons: - id: error lameid: 40530 @@ -219,8 +222,6 @@ ehmtxv2: lameid: 2819 - id: sleep8x32 url: https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif - - id: sleep8x32 - url: https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif on_next_screen: - homeassistant.event: event: ehmtxv2.new_screen