Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: "E-ink: prognoza pogody 24h"
- description: Pokazuje na wyświetlaczu e-ink prognozę temperatury i opadów na najbliższe 24h
- triggers: []
- conditions: []
- actions:
- - data:
- type: hourly
- target:
- entity_id: weather.forecast_dom
- response_variable: weather_forecast
- action: weather.get_forecasts
- - data:
- device_id: xxx
- payload:
- - type: rectangle
- x_start: 0
- y_start: 0
- x_end: 296
- y_end: 128
- fill: white
- - type: rectangle
- x_start: 0
- y_start: 0
- x_end: 296
- y_end: 20
- fill: black
- - type: text
- value: PROGNOZA POGODY 24H
- font: fonts/GmarketSansTTFBold.ttf
- anchor: lt
- x: 10
- "y": 3
- size: 14
- color: white
- - type: text
- value: "{{ now().strftime('%H:%M') }}"
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: rt
- x: 286
- "y": 4
- size: 12
- color: white
- - type: text
- value: >-
- Teraz: {{ state_attr('weather.forecast_dom', 'temperature') | float
- | round(1) }}°C
- font: fonts/GmarketSansTTFBold.ttf
- anchor: lt
- x: 10
- "y": 25
- size: 14
- color: black
- - type: text
- value: "{{ state_attr('weather.forecast_dom', 'humidity') | int }}%"
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: lt
- x: 120
- "y": 26
- size: 12
- color: black
- - type: line
- x_start: 25
- y_start: 45
- x_end: 25
- y_end: 80
- width: 2
- fill: black
- - type: line
- x_start: 25
- y_start: 80
- x_end: 290
- y_end: 80
- width: 1
- fill: black
- - type: text
- value: °C
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: rt
- x: 23
- "y": 43
- size: 9
- color: black
- - type: rectangle
- x_start: 28
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[0].temperature |
- float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 48
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[0].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 38
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[0].temperature |
- float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 50
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[2].temperature |
- float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 70
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[2].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 60
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[2].temperature |
- float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 72
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[4].temperature |
- float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 92
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[4].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 82
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[4].temperature |
- float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 94
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[6].temperature |
- float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 114
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[6].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 104
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[6].temperature |
- float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 116
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[8].temperature |
- float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 136
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[8].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 126
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[8].temperature |
- float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 138
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[10].temperature
- | float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 158
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[10].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 148
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[10].temperature
- | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 160
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[12].temperature
- | float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 180
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[12].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 170
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[12].temperature
- | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 182
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[14].temperature
- | float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 202
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[14].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 192
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[14].temperature
- | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 204
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[16].temperature
- | float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 224
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[16].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 214
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[16].temperature
- | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 226
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[18].temperature
- | float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 246
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[18].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 236
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[18].temperature
- | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 248
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[20].temperature
- | float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 268
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[20].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 258
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[20].temperature
- | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: rectangle
- x_start: 270
- y_start: >-
- {{ [[45, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[22].temperature
- | float(10) + 5) * 1.17) | int] | max, 80] | min }}
- x_end: 290
- y_end: 80
- fill: black
- - type: text
- value: >-
- {{ weather_forecast['weather.forecast_dom'].forecast[22].temperature
- | float | round(0) | int }}°
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mb
- x: 280
- "y": >-
- {{ [[38, 80 -
- ((weather_forecast['weather.forecast_dom'].forecast[22].temperature
- | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
- size: 8
- color: black
- - type: line
- x_start: 5
- y_start: 85
- x_end: 291
- y_end: 85
- width: 1
- fill: black
- - type: text
- value: Opady (mm)
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: lt
- x: 10
- "y": 88
- size: 10
- color: black
- - type: line
- x_start: 25
- y_start: 100
- x_end: 25
- y_end: 120
- width: 1
- fill: black
- - type: line
- x_start: 25
- y_start: 120
- x_end: 290
- y_end: 120
- width: 1
- fill: black
- - type: rectangle
- x_start: 28
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[0].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 48
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 50
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[2].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 70
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 72
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[4].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 92
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 94
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[6].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 114
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 116
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[8].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 136
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 138
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[10].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 158
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 160
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[12].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 180
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 182
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[14].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 202
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 204
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[16].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 224
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 226
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[18].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 246
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 248
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[20].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 268
- y_end: 120
- fill: red
- - type: rectangle
- x_start: 270
- y_start: >-
- {{ [100, 120 -
- ((weather_forecast['weather.forecast_dom'].forecast[22].precipitation
- | float(0)) * 20) | int] | max }}
- x_end: 290
- y_end: 120
- fill: red
- - type: text
- value: "{{ (now() + timedelta(hours=0)).strftime('%H') }}"
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mt
- x: 38
- "y": 122
- size: 7
- color: black
- - type: text
- value: "{{ (now() + timedelta(hours=4)).strftime('%H') }}"
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mt
- x: 82
- "y": 122
- size: 7
- color: black
- - type: text
- value: "{{ (now() + timedelta(hours=8)).strftime('%H') }}"
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mt
- x: 126
- "y": 122
- size: 7
- color: black
- - type: text
- value: "{{ (now() + timedelta(hours=12)).strftime('%H') }}"
- font: fonts/GmarketSansTTFBold.ttf
- anchor: mt
- x: 170
- "y": 122
- size: 7
- color: black
- - type: text
- value: "{{ (now() + timedelta(hours=16)).strftime('%H') }}"
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mt
- x: 214
- "y": 122
- size: 7
- color: black
- - type: text
- value: "{{ (now() + timedelta(hours=20)).strftime('%H') }}"
- font: fonts/GmarketSansTTFMedium.ttf
- anchor: mt
- x: 258
- "y": 122
- size: 7
- color: black
- target:
- device_id: xxx
- action: gicisky.write
- mode: single
Advertisement
Add Comment
Please, Sign In to add comment