-
Notifications
You must be signed in to change notification settings - Fork 36
7,4" homeassistant sensor display
Stefan Silberstein edited this page Nov 20, 2023
·
3 revisions
As it took me some time to display the values my wife wanted to be visible I thought i might share the code so that you safe some time :)
My wife wanted an easy readable display of
- inside temperature
- inside humidity
- outside temperature
- outside humidity
- next sunrise
- next sunset
I then added icons from two boolean inputs (honey sold and mail in the mailbox) that are only shown when the refering input booleans are "on" The display is rotated so that the mounting bracket can be used to mount it on the wall later on.
It is not super aligned but it is sufficient for my view :)
The Automation which is only running when somebody could be awake looks like this
alias: Wetterstation
description: ""
trigger:
- platform: time_pattern
minutes: /30
condition:
- condition: time
after: "05:30:00"
before: "22:00:00"
enabled: true
action:
- service: open_epaper_link.drawcustom
target:
entity_id:
- open_epaper_link.YOUR_EPAPER_ADRESS_HERE
data:
background: white
rotate: 270
ttl: 300
payload:
- type: icon
value: home-import-outline
x: 0
"y": 20
size: 100
color: black
- type: text
y_padding: 25
value: "{{states('sensor.temperatursensor_wohnraum_temperature')| string }}"
x: 100
"y": 20
size: 60
color: black
- type: icon
value: temperature-celsius
x: 300
"y": 5
size: 80
color: black
- type: text
y_padding: 25
value: "{{states('sensor.temperatursensor_wohnraum_humidity')| string }}"
x: 100
"y": 95
size: 60
color: black
- type: icon
value: cloud-percent-outline
x: 300
"y": 75
size: 80
color: black
- type: line
fill: red
width: 5
x_start: 0
y_start: 150
x_end: 384
y_end: 150
- type: icon
value: home-export-outline
x: 0
"y": 175
size: 100
color: black
- type: text
y_padding: 25
value: "{{states('sensor.temperatursensor_aussen_temperature')| string }}"
x: 100
"y": 175
size: 60
color: black
- type: icon
value: temperature-celsius
x: 300
"y": 155
size: 80
color: black
- type: text
y_padding: 25
value: "{{states('sensor.temperatursensor_aussen_humidity')| string }}"
x: 100
"y": 245
size: 60
color: black
- type: icon
value: cloud-percent-outline
x: 300
"y": 225
size: 80
color: black
- type: line
fill: red
width: 5
x_start: 0
y_start: 300
x_end: 384
y_end: 300
- type: icon
value: weather-sunset-up
x: 0
"y": 300
size: 80
color: black
- type: text
y_padding: 25
value: >-
{{ as_timestamp(state_attr('sun.sun', 'next_rising')) |
timestamp_custom('%H:%M', true ) }}
x: 100
"y": 320
size: 60
color: black
- type: icon
value: weather-sunset-down
x: 0
"y": 380
size: 80
color: black
- type: text
y_padding: 25
value: >-
{{ as_timestamp(state_attr('sun.sun', 'next_setting')) |
timestamp_custom('%H:%M', true ) }}
x: 100
"y": 390
size: 60
color: black
- type: text
y_padding: 25
value: Uhr
x: 270
"y": 320
size: 60
color: black
- type: text
y_padding: 25
value: Uhr
x: 270
"y": 390
size: 60
color: black
- type: line
fill: red
width: 5
x_start: 0
y_start: 455
x_end: 384
y_end: 455
- type: icon
value: beehive-outline
x: 0
"y": 500
size: 100
color: "{{ 'black' if is_state('input_boolean.honig', 'on') else 'white' }}"
- type: icon
value: email
x: 150
"y": 500
size: 100
color: >-
{{ 'black' if is_state('input_boolean.briefkasten', 'on') else
'white' }}
mode: restart
I hope you like it :)