Guest User

Untitled

a guest
Nov 10th, 2025
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 17.15 KB | None | 0 0
  1. alias: "E-ink: prognoza pogody 24h"
  2. description: Pokazuje na wyświetlaczu e-ink prognozę temperatury i opadów na najbliższe 24h
  3. triggers: []
  4. conditions: []
  5. actions:
  6.   - data:
  7.       type: hourly
  8.     target:
  9.       entity_id: weather.forecast_dom
  10.     response_variable: weather_forecast
  11.     action: weather.get_forecasts
  12.   - data:
  13.       device_id: xxx
  14.       payload:
  15.         - type: rectangle
  16.           x_start: 0
  17.           y_start: 0
  18.           x_end: 296
  19.           y_end: 128
  20.           fill: white
  21.         - type: rectangle
  22.           x_start: 0
  23.           y_start: 0
  24.           x_end: 296
  25.           y_end: 20
  26.           fill: black
  27.         - type: text
  28.           value: PROGNOZA POGODY 24H
  29.           font: fonts/GmarketSansTTFBold.ttf
  30.           anchor: lt
  31.           x: 10
  32.           "y": 3
  33.           size: 14
  34.           color: white
  35.         - type: text
  36.           value: "{{ now().strftime('%H:%M') }}"
  37.           font: fonts/GmarketSansTTFMedium.ttf
  38.           anchor: rt
  39.           x: 286
  40.           "y": 4
  41.           size: 12
  42.           color: white
  43.         - type: text
  44.           value: >-
  45.             Teraz: {{ state_attr('weather.forecast_dom', 'temperature') | float
  46.             | round(1) }}°C
  47.           font: fonts/GmarketSansTTFBold.ttf
  48.           anchor: lt
  49.           x: 10
  50.           "y": 25
  51.           size: 14
  52.           color: black
  53.         - type: text
  54.           value: "{{ state_attr('weather.forecast_dom', 'humidity') | int }}%"
  55.           font: fonts/GmarketSansTTFMedium.ttf
  56.           anchor: lt
  57.           x: 120
  58.           "y": 26
  59.           size: 12
  60.           color: black
  61.         - type: line
  62.           x_start: 25
  63.           y_start: 45
  64.           x_end: 25
  65.           y_end: 80
  66.           width: 2
  67.           fill: black
  68.         - type: line
  69.           x_start: 25
  70.           y_start: 80
  71.           x_end: 290
  72.           y_end: 80
  73.           width: 1
  74.           fill: black
  75.         - type: text
  76.           value: °C
  77.           font: fonts/GmarketSansTTFMedium.ttf
  78.           anchor: rt
  79.           x: 23
  80.           "y": 43
  81.           size: 9
  82.           color: black
  83.         - type: rectangle
  84.           x_start: 28
  85.           y_start: >-
  86.             {{ [[45, 80 -
  87.             ((weather_forecast['weather.forecast_dom'].forecast[0].temperature |
  88.            float(10) + 5) * 1.17) | int] | max, 80] | min }}
  89.           x_end: 48
  90.           y_end: 80
  91.           fill: black
  92.         - type: text
  93.           value: >-
  94.             {{ weather_forecast['weather.forecast_dom'].forecast[0].temperature
  95.             | float | round(0) | int }}°
  96.           font: fonts/GmarketSansTTFMedium.ttf
  97.           anchor: mb
  98.           x: 38
  99.           "y": >-
  100.             {{ [[38, 80 -
  101.             ((weather_forecast['weather.forecast_dom'].forecast[0].temperature |
  102.            float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  103.           size: 8
  104.           color: black
  105.         - type: rectangle
  106.           x_start: 50
  107.           y_start: >-
  108.             {{ [[45, 80 -
  109.             ((weather_forecast['weather.forecast_dom'].forecast[2].temperature |
  110.            float(10) + 5) * 1.17) | int] | max, 80] | min }}
  111.           x_end: 70
  112.           y_end: 80
  113.           fill: black
  114.         - type: text
  115.           value: >-
  116.             {{ weather_forecast['weather.forecast_dom'].forecast[2].temperature
  117.             | float | round(0) | int }}°
  118.           font: fonts/GmarketSansTTFMedium.ttf
  119.           anchor: mb
  120.           x: 60
  121.           "y": >-
  122.             {{ [[38, 80 -
  123.             ((weather_forecast['weather.forecast_dom'].forecast[2].temperature |
  124.            float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  125.           size: 8
  126.           color: black
  127.         - type: rectangle
  128.           x_start: 72
  129.           y_start: >-
  130.             {{ [[45, 80 -
  131.             ((weather_forecast['weather.forecast_dom'].forecast[4].temperature |
  132.            float(10) + 5) * 1.17) | int] | max, 80] | min }}
  133.           x_end: 92
  134.           y_end: 80
  135.           fill: black
  136.         - type: text
  137.           value: >-
  138.             {{ weather_forecast['weather.forecast_dom'].forecast[4].temperature
  139.             | float | round(0) | int }}°
  140.           font: fonts/GmarketSansTTFMedium.ttf
  141.           anchor: mb
  142.           x: 82
  143.           "y": >-
  144.             {{ [[38, 80 -
  145.             ((weather_forecast['weather.forecast_dom'].forecast[4].temperature |
  146.            float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  147.           size: 8
  148.           color: black
  149.         - type: rectangle
  150.           x_start: 94
  151.           y_start: >-
  152.             {{ [[45, 80 -
  153.             ((weather_forecast['weather.forecast_dom'].forecast[6].temperature |
  154.            float(10) + 5) * 1.17) | int] | max, 80] | min }}
  155.           x_end: 114
  156.           y_end: 80
  157.           fill: black
  158.         - type: text
  159.           value: >-
  160.             {{ weather_forecast['weather.forecast_dom'].forecast[6].temperature
  161.             | float | round(0) | int }}°
  162.           font: fonts/GmarketSansTTFMedium.ttf
  163.           anchor: mb
  164.           x: 104
  165.           "y": >-
  166.             {{ [[38, 80 -
  167.             ((weather_forecast['weather.forecast_dom'].forecast[6].temperature |
  168.            float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  169.           size: 8
  170.           color: black
  171.         - type: rectangle
  172.           x_start: 116
  173.           y_start: >-
  174.             {{ [[45, 80 -
  175.             ((weather_forecast['weather.forecast_dom'].forecast[8].temperature |
  176.            float(10) + 5) * 1.17) | int] | max, 80] | min }}
  177.           x_end: 136
  178.           y_end: 80
  179.           fill: black
  180.         - type: text
  181.           value: >-
  182.             {{ weather_forecast['weather.forecast_dom'].forecast[8].temperature
  183.             | float | round(0) | int }}°
  184.           font: fonts/GmarketSansTTFMedium.ttf
  185.           anchor: mb
  186.           x: 126
  187.           "y": >-
  188.             {{ [[38, 80 -
  189.             ((weather_forecast['weather.forecast_dom'].forecast[8].temperature |
  190.            float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  191.           size: 8
  192.           color: black
  193.         - type: rectangle
  194.           x_start: 138
  195.           y_start: >-
  196.             {{ [[45, 80 -
  197.             ((weather_forecast['weather.forecast_dom'].forecast[10].temperature
  198.             | float(10) + 5) * 1.17) | int] | max, 80] | min }}
  199.           x_end: 158
  200.           y_end: 80
  201.           fill: black
  202.         - type: text
  203.           value: >-
  204.             {{ weather_forecast['weather.forecast_dom'].forecast[10].temperature
  205.             | float | round(0) | int }}°
  206.           font: fonts/GmarketSansTTFMedium.ttf
  207.           anchor: mb
  208.           x: 148
  209.           "y": >-
  210.             {{ [[38, 80 -
  211.             ((weather_forecast['weather.forecast_dom'].forecast[10].temperature
  212.             | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  213.           size: 8
  214.           color: black
  215.         - type: rectangle
  216.           x_start: 160
  217.           y_start: >-
  218.             {{ [[45, 80 -
  219.             ((weather_forecast['weather.forecast_dom'].forecast[12].temperature
  220.             | float(10) + 5) * 1.17) | int] | max, 80] | min }}
  221.           x_end: 180
  222.           y_end: 80
  223.           fill: black
  224.         - type: text
  225.           value: >-
  226.             {{ weather_forecast['weather.forecast_dom'].forecast[12].temperature
  227.             | float | round(0) | int }}°
  228.           font: fonts/GmarketSansTTFMedium.ttf
  229.           anchor: mb
  230.           x: 170
  231.           "y": >-
  232.             {{ [[38, 80 -
  233.             ((weather_forecast['weather.forecast_dom'].forecast[12].temperature
  234.             | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  235.           size: 8
  236.           color: black
  237.         - type: rectangle
  238.           x_start: 182
  239.           y_start: >-
  240.             {{ [[45, 80 -
  241.             ((weather_forecast['weather.forecast_dom'].forecast[14].temperature
  242.             | float(10) + 5) * 1.17) | int] | max, 80] | min }}
  243.           x_end: 202
  244.           y_end: 80
  245.           fill: black
  246.         - type: text
  247.           value: >-
  248.             {{ weather_forecast['weather.forecast_dom'].forecast[14].temperature
  249.             | float | round(0) | int }}°
  250.           font: fonts/GmarketSansTTFMedium.ttf
  251.           anchor: mb
  252.           x: 192
  253.           "y": >-
  254.             {{ [[38, 80 -
  255.             ((weather_forecast['weather.forecast_dom'].forecast[14].temperature
  256.             | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  257.           size: 8
  258.           color: black
  259.         - type: rectangle
  260.           x_start: 204
  261.           y_start: >-
  262.             {{ [[45, 80 -
  263.             ((weather_forecast['weather.forecast_dom'].forecast[16].temperature
  264.             | float(10) + 5) * 1.17) | int] | max, 80] | min }}
  265.           x_end: 224
  266.           y_end: 80
  267.           fill: black
  268.         - type: text
  269.           value: >-
  270.             {{ weather_forecast['weather.forecast_dom'].forecast[16].temperature
  271.             | float | round(0) | int }}°
  272.           font: fonts/GmarketSansTTFMedium.ttf
  273.           anchor: mb
  274.           x: 214
  275.           "y": >-
  276.             {{ [[38, 80 -
  277.             ((weather_forecast['weather.forecast_dom'].forecast[16].temperature
  278.             | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  279.           size: 8
  280.           color: black
  281.         - type: rectangle
  282.           x_start: 226
  283.           y_start: >-
  284.             {{ [[45, 80 -
  285.             ((weather_forecast['weather.forecast_dom'].forecast[18].temperature
  286.             | float(10) + 5) * 1.17) | int] | max, 80] | min }}
  287.           x_end: 246
  288.           y_end: 80
  289.           fill: black
  290.         - type: text
  291.           value: >-
  292.             {{ weather_forecast['weather.forecast_dom'].forecast[18].temperature
  293.             | float | round(0) | int }}°
  294.           font: fonts/GmarketSansTTFMedium.ttf
  295.           anchor: mb
  296.           x: 236
  297.           "y": >-
  298.             {{ [[38, 80 -
  299.             ((weather_forecast['weather.forecast_dom'].forecast[18].temperature
  300.             | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  301.           size: 8
  302.           color: black
  303.         - type: rectangle
  304.           x_start: 248
  305.           y_start: >-
  306.             {{ [[45, 80 -
  307.             ((weather_forecast['weather.forecast_dom'].forecast[20].temperature
  308.             | float(10) + 5) * 1.17) | int] | max, 80] | min }}
  309.           x_end: 268
  310.           y_end: 80
  311.           fill: black
  312.         - type: text
  313.           value: >-
  314.             {{ weather_forecast['weather.forecast_dom'].forecast[20].temperature
  315.             | float | round(0) | int }}°
  316.           font: fonts/GmarketSansTTFMedium.ttf
  317.           anchor: mb
  318.           x: 258
  319.           "y": >-
  320.             {{ [[38, 80 -
  321.             ((weather_forecast['weather.forecast_dom'].forecast[20].temperature
  322.             | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  323.           size: 8
  324.           color: black
  325.         - type: rectangle
  326.           x_start: 270
  327.           y_start: >-
  328.             {{ [[45, 80 -
  329.             ((weather_forecast['weather.forecast_dom'].forecast[22].temperature
  330.             | float(10) + 5) * 1.17) | int] | max, 80] | min }}
  331.           x_end: 290
  332.           y_end: 80
  333.           fill: black
  334.         - type: text
  335.           value: >-
  336.             {{ weather_forecast['weather.forecast_dom'].forecast[22].temperature
  337.             | float | round(0) | int }}°
  338.           font: fonts/GmarketSansTTFMedium.ttf
  339.           anchor: mb
  340.           x: 280
  341.           "y": >-
  342.             {{ [[38, 80 -
  343.             ((weather_forecast['weather.forecast_dom'].forecast[22].temperature
  344.             | float(10) + 5) * 1.17) | int - 4] | max, 78] | min }}
  345.           size: 8
  346.           color: black
  347.         - type: line
  348.           x_start: 5
  349.           y_start: 85
  350.           x_end: 291
  351.           y_end: 85
  352.           width: 1
  353.           fill: black
  354.         - type: text
  355.           value: Opady (mm)
  356.           font: fonts/GmarketSansTTFMedium.ttf
  357.           anchor: lt
  358.           x: 10
  359.           "y": 88
  360.           size: 10
  361.           color: black
  362.         - type: line
  363.           x_start: 25
  364.           y_start: 100
  365.           x_end: 25
  366.           y_end: 120
  367.           width: 1
  368.           fill: black
  369.         - type: line
  370.           x_start: 25
  371.           y_start: 120
  372.           x_end: 290
  373.           y_end: 120
  374.           width: 1
  375.           fill: black
  376.         - type: rectangle
  377.           x_start: 28
  378.           y_start: >-
  379.             {{ [100, 120 -
  380.             ((weather_forecast['weather.forecast_dom'].forecast[0].precipitation
  381.             | float(0)) * 20) | int] | max }}
  382.           x_end: 48
  383.           y_end: 120
  384.           fill: red
  385.         - type: rectangle
  386.           x_start: 50
  387.           y_start: >-
  388.             {{ [100, 120 -
  389.             ((weather_forecast['weather.forecast_dom'].forecast[2].precipitation
  390.             | float(0)) * 20) | int] | max }}
  391.           x_end: 70
  392.           y_end: 120
  393.           fill: red
  394.         - type: rectangle
  395.           x_start: 72
  396.           y_start: >-
  397.             {{ [100, 120 -
  398.             ((weather_forecast['weather.forecast_dom'].forecast[4].precipitation
  399.             | float(0)) * 20) | int] | max }}
  400.           x_end: 92
  401.           y_end: 120
  402.           fill: red
  403.         - type: rectangle
  404.           x_start: 94
  405.           y_start: >-
  406.             {{ [100, 120 -
  407.             ((weather_forecast['weather.forecast_dom'].forecast[6].precipitation
  408.             | float(0)) * 20) | int] | max }}
  409.           x_end: 114
  410.           y_end: 120
  411.           fill: red
  412.         - type: rectangle
  413.           x_start: 116
  414.           y_start: >-
  415.             {{ [100, 120 -
  416.             ((weather_forecast['weather.forecast_dom'].forecast[8].precipitation
  417.             | float(0)) * 20) | int] | max }}
  418.           x_end: 136
  419.           y_end: 120
  420.           fill: red
  421.         - type: rectangle
  422.           x_start: 138
  423.           y_start: >-
  424.             {{ [100, 120 -
  425.             ((weather_forecast['weather.forecast_dom'].forecast[10].precipitation
  426.             | float(0)) * 20) | int] | max }}
  427.           x_end: 158
  428.           y_end: 120
  429.           fill: red
  430.         - type: rectangle
  431.           x_start: 160
  432.           y_start: >-
  433.             {{ [100, 120 -
  434.             ((weather_forecast['weather.forecast_dom'].forecast[12].precipitation
  435.             | float(0)) * 20) | int] | max }}
  436.           x_end: 180
  437.           y_end: 120
  438.           fill: red
  439.         - type: rectangle
  440.           x_start: 182
  441.           y_start: >-
  442.             {{ [100, 120 -
  443.             ((weather_forecast['weather.forecast_dom'].forecast[14].precipitation
  444.             | float(0)) * 20) | int] | max }}
  445.           x_end: 202
  446.           y_end: 120
  447.           fill: red
  448.         - type: rectangle
  449.           x_start: 204
  450.           y_start: >-
  451.             {{ [100, 120 -
  452.             ((weather_forecast['weather.forecast_dom'].forecast[16].precipitation
  453.             | float(0)) * 20) | int] | max }}
  454.           x_end: 224
  455.           y_end: 120
  456.           fill: red
  457.         - type: rectangle
  458.           x_start: 226
  459.           y_start: >-
  460.             {{ [100, 120 -
  461.             ((weather_forecast['weather.forecast_dom'].forecast[18].precipitation
  462.             | float(0)) * 20) | int] | max }}
  463.           x_end: 246
  464.           y_end: 120
  465.           fill: red
  466.         - type: rectangle
  467.           x_start: 248
  468.           y_start: >-
  469.             {{ [100, 120 -
  470.             ((weather_forecast['weather.forecast_dom'].forecast[20].precipitation
  471.             | float(0)) * 20) | int] | max }}
  472.           x_end: 268
  473.           y_end: 120
  474.           fill: red
  475.         - type: rectangle
  476.           x_start: 270
  477.           y_start: >-
  478.             {{ [100, 120 -
  479.             ((weather_forecast['weather.forecast_dom'].forecast[22].precipitation
  480.             | float(0)) * 20) | int] | max }}
  481.           x_end: 290
  482.           y_end: 120
  483.           fill: red
  484.         - type: text
  485.           value: "{{ (now() + timedelta(hours=0)).strftime('%H') }}"
  486.           font: fonts/GmarketSansTTFMedium.ttf
  487.           anchor: mt
  488.           x: 38
  489.           "y": 122
  490.           size: 7
  491.           color: black
  492.         - type: text
  493.           value: "{{ (now() + timedelta(hours=4)).strftime('%H') }}"
  494.           font: fonts/GmarketSansTTFMedium.ttf
  495.           anchor: mt
  496.           x: 82
  497.           "y": 122
  498.           size: 7
  499.           color: black
  500.         - type: text
  501.           value: "{{ (now() + timedelta(hours=8)).strftime('%H') }}"
  502.           font: fonts/GmarketSansTTFMedium.ttf
  503.           anchor: mt
  504.           x: 126
  505.           "y": 122
  506.           size: 7
  507.           color: black
  508.         - type: text
  509.           value: "{{ (now() + timedelta(hours=12)).strftime('%H') }}"
  510.           font: fonts/GmarketSansTTFBold.ttf
  511.           anchor: mt
  512.           x: 170
  513.           "y": 122
  514.           size: 7
  515.           color: black
  516.         - type: text
  517.           value: "{{ (now() + timedelta(hours=16)).strftime('%H') }}"
  518.           font: fonts/GmarketSansTTFMedium.ttf
  519.           anchor: mt
  520.           x: 214
  521.           "y": 122
  522.           size: 7
  523.           color: black
  524.         - type: text
  525.           value: "{{ (now() + timedelta(hours=20)).strftime('%H') }}"
  526.           font: fonts/GmarketSansTTFMedium.ttf
  527.           anchor: mt
  528.           x: 258
  529.           "y": 122
  530.           size: 7
  531.           color: black
  532.     target:
  533.       device_id: xxx
  534.     action: gicisky.write
  535. mode: single
  536.  
Advertisement
Add Comment
Please, Sign In to add comment