pull/2/head
LuBeDa 3 years ago
parent 70e6741d32
commit 90c01e1de9

@ -9,26 +9,32 @@ blueprint:
selector: selector:
device: device:
integration: esphome integration: esphome
mode: trigger_sensor:
name: which state to show
description: This sensor state will be displayed
selector:
entity:
domain: sensor
screen_mode:
name: the mode name: the mode
selector: selector:
select: select:
custom_value: true custom_value: true
mode: dropdown mode: dropdown
options: options:
- label: MODE_ICONSCREEN - label: MODE_ICONSCREEN
value: 5 value: 5
- label: MODE_BLANK - label: MODE_BLANK
value: 1 value: 1
- label: MODE_CLOCK - label: MODE_CLOCK
value: 2 value: 2
- label: MODE_DATE - label: MODE_DATE
value: 3 value: 3
- label: MODE_FULLSCREEN - label: MODE_FULLSCREEN
value: 4 value: 4
- label: MODE_TEXT - label: MODE_TEXT
value: 6 value: 6
default: 5 default: 5
icon_name: icon_name:
name: the icon name: the icon
selector: selector:
@ -50,84 +56,18 @@ blueprint:
selector: selector:
color_rgb: color_rgb:
default: [40, 240, 40] default: [40, 240, 40]
high_value:
name: upper limit
selector:
number:
mode: box
min: -10000
max: +10000
high_color:
name: High Color
description: Text color for values above the defined value
selector:
color_rgb:
default: [240, 40, 40]
default_font:
name: true uses the default, false the specialer font
selector:
boolean:
default: true
variables: variables:
display: !input ehmtx_device display: !input ehmtx_device
def_color: !input default_color
lo_color: !input low_color
hi_color: !input high_color
trigger: trigger:
- platform: state - platform: state
entity_id: !input trigger_sensor entity_id: !input trigger_sensor
action: action:
- choose: sequence:
- conditions: - service: esphome.{{ device_attr(display, "name") }}_del_screen
- condition: numeric_state data:
entity_id: !input trigger_sensor icon_name: !input icon_name
below: !input low_value mode: {{ !input screen_mode }}
sequence:
- service: esphome.{{ device_attr(display, "name") }}_icon_screen
data:
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}}"
default_font: !input default_font
r: |-
{{ lo_color[0] }}
g: |-
{{ lo_color[1] }}
b: |-
{{ lo_color[2] }}
- conditions:
- condition: numeric_state
entity_id: !input trigger_sensor
above: !input high_value
sequence:
- service: esphome.{{ device_attr(display, "name") }}_icon_screen
data:
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}}"
default_font: !input default_font
r: |-
{{ hi_color[0] }}
g: |-
{{ hi_color[1] }}
b: |-
{{ hi_color[2] }}
default:
- service: esphome.{{ device_attr(display, "name") }}_icon_screen
data:
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}}"
default_font: !input default_font
r: |-
{{ def_color[0] }}
g: |-
{{ def_color[1] }}
b: |-
{{ def_color[2] }}

@ -9,6 +9,12 @@ blueprint:
selector: selector:
device: device:
integration: esphome integration: esphome
trigger_sensor:
name: which state to show
description: This sensor state will be displayed
selector:
entity:
domain: sensor
element: element:
name: the element name: the element
selector: selector:
@ -22,19 +28,11 @@ blueprint:
value: hide_gauge value: hide_gauge
- label: indicator - label: indicator
value: hide_indicator value: hide_indicator
default: hide_indicator default: hide_indicator
element_color:
name: The color for the element
description: the color
selector:
color_rgb:
default: [240, 40, 40]
variables: variables:
display: !input ehmtx_device display: !input ehmtx_device
element_color: !input element_color
sercice: !input element sercice: !input element
value: !input gauge_value
trigger: trigger:
- platform: state - platform: state
@ -43,10 +41,3 @@ trigger:
action: action:
- service: esphome.{{ device_attr(display, "name") }}_{{service}} - service: esphome.{{ device_attr(display, "name") }}_{{service}}
data: data:
value: {{ value }}
r: |-
{{ element_color[0] }}
g: |-
{{ element_color[1] }}
b: |-
{{ element_color[2] }}

@ -9,6 +9,12 @@ blueprint:
selector: selector:
device: device:
integration: esphome integration: esphome
trigger_sensor:
name: which state to show
description: This sensor state will be displayed
selector:
entity:
domain: sensor
element: element:
name: the element name: the element
selector: selector:
@ -22,7 +28,7 @@ blueprint:
value: show_gauge value: show_gauge
- label: indicator - label: indicator
value: show_indicator value: show_indicator
default: show_indicator default: show_indicator
gauge_value: gauge_value:
name: the value on the gauge name: the value on the gauge
selector: selector:
@ -30,6 +36,7 @@ blueprint:
mode: slider mode: slider
min: 0 min: 0
max: 100 max: 100
default: 50
element_color: element_color:
name: The color for the element name: The color for the element
description: the color description: the color

@ -35,6 +35,7 @@ esp32:
font: font:
- file: EHMTXv2.ttf - file: EHMTXv2.ttf
size: 16
id: default_font id: default_font
glyphs: | glyphs: |
!?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz@<>ß§€/ !?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz@<>ß§€/
@ -234,3 +235,9 @@ ehmtx:
lameid: 2819 lameid: 2819
- id: sleep8x32 - id: sleep8x32
url: https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif url: https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif
on_next_screen:
- homeassistant.event:
event: ehmtxv2.new_screen
data_template:
iconname: !lambda "return x.c_str();"
text: !lambda "return y.c_str();"

Loading…
Cancel
Save