Elpriser, staplar - openhasp.yaml

 avatar
McBenac
yaml
2 months ago
84 kB
24
Indexable
Never
    # Elpriser staplarna

    # Sätt strecken för priserna på rätt y-koordinat
    # Det 1a strecket nedifrån ( det nedersta ska alltid ligga på [[40,247],[45,247]] )
    - obj: "p3b4"
      properties:
        "points": "[[40,247],[45,247]]"

    # Det 2a strecket nedifrån ( det nedersta ska alltid ligga på [[40,247],[45,247]] )
    - obj: "p3b5"
      properties:
        "points": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (247 - (180 / num_of_ticks * 1)) | int %}
          '[[40,{{ y }}],[45,{{ y }}]]'
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 1 %}1{% else %}0{% endif %}

    # Det 3e strecket nedifrån
    - obj: "p3b6"
      properties:
        "points": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (247 - (180 / num_of_ticks * 2)) | int %}
          [[40,{{ y }}],[45,{{ y }}]]
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 2 %}1{% else %}0{% endif %}
    # Det 4e strecket nedifrån
    - obj: "p3b7"
      properties:
        "points": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (247 - (180 / num_of_ticks * 3)) | int %}
          [[40,{{ y }}],[45,{{ y }}]]
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 3 %}1{% else %}0{% endif %}
    # Det 5e strecket nedifrån
    - obj: "p3b8"
      properties:
        "points": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (247 - (180 / num_of_ticks * 4)) | int %}
          [[40,{{ y }}],[45,{{ y }}]]
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 4 %}1{% else %}0{% endif %}
    # Det 6e strecket nedifrån
    - obj: "p3b9"
      properties:
        "points": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (247 - (180 / num_of_ticks * 5)) | int %}
          [[40,{{ y }}],[45,{{ y }}]]
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 5 %}1{% else %}0{% endif %}
    # Det 7e strecket nedifrån
    - obj: "p3b10"
      properties:
        "points": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (247 - (180 / num_of_ticks * 6)) | int %}
          [[40,{{ y }}],[45,{{ y }}]]
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 6 %}1{% else %}0{% endif %}
    # Det 8e strecket nedifrån
    - obj: "p3b11"
      properties:
        "points": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (247 - (180 / num_of_ticks * 7)) | int %}
          [[40,{{ y }}],[45,{{ y }}]]
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 7 %}1{% else %}0{% endif %}
    # Det 9e strecket nedifrån
    - obj: "p3b12"
      properties:
        "points": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (247 - (180 / num_of_ticks * 8)) | int %}
          [[40,{{ y }}],[45,{{ y }}]]
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 8 %}1{% else %}0{% endif %}
    # Det 10e strecket nedifrån
    - obj: "p3b13"
      properties:
        "points": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (247 - (180 / num_of_ticks * 9)) | int %}
          [[40,{{ y }}],[45,{{ y }}]]
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 9 %}1{% else %}0{% endif %}

    # Sätt prisernas labels på rätt y-koordinat samt till rätt värde
    # Det 1a värdet nerifrån
    - obj: "p3b14"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 0)) | round(2)}}
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 0 %}1{% else %}0{% endif %}
    # Det 2a värdet nerifrån
    - obj: "p3b15"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239 - (180 / num_of_ticks * 1)) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 1)) | round(2) }}
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 1 %}1{% else %}0{% endif %}
    # Det 3e värdet nerifrån
    - obj: "p3b16"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239 - (180 / num_of_ticks * 2)) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 2)) | round(2) }}
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 2 %}1{% else %}0{% endif %}
    # Det 4e värdet nerifrån
    - obj: "p3b17"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239 - (180 / num_of_ticks * 3)) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 3)) | round(2) }}
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 3 %}1{% else %}0{% endif %}
    # Det 5e värdet nerifrån
    - obj: "p3b18"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239 - (180 / num_of_ticks * 4)) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 4)) | round(2) }}
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 4 %}1{% else %}0{% endif %}
    # Det 6e värdet nerifrån
    - obj: "p3b19"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239 - (180 / num_of_ticks * 5)) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 5)) | round(2) }}
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 5 %}1{% else %}0{% endif %}
    # Det 7e värdet nerifrån
    - obj: "p3b20"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239 - (180 / num_of_ticks * 6)) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 6)) | round(2) }}
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 6 %}1{% else %}0{% endif %}
    # Det 8e värdet nerifrån
    - obj: "p3b21"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239 - (180 / num_of_ticks * 7)) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 7)) | round(2) }}
        "hidden": >
          {% if num_of_ticks < 7 %}1{% else %}0{% endif %}
    # Det 9e värdet nerifrån
    - obj: "p3b22"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239 - (180 / num_of_ticks * 8)) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 8)) | round(2) }}
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 8 %}1{% else %}0{% endif %}
    # Det 10e värdet nerifrån
    - obj: "p3b23"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% set y = (239 - (180 / num_of_ticks * 9)) | int %}
          {{ y }}
        "text": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {{ (min_value + (0.5 * 9)) | round(2) }}
        "hidden": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set all_values = today_values + tomorrow_values %}{% set max_value = ((all_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((all_values | min) / 0.5) | round(0, 'floor') * 0.5 %}{% set num_of_ticks = (((max_value - min_value) / 0.5)) | int %}
          {% if num_of_ticks < 9 %}1{% else %}0{% endif %}

    # Sätt staplarnas properties

    # Staplar för dagens priser
    # Visa pris för timme 1
    - obj: "p3b24"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[0] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[0] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "00" %}#000080{% else %}#008000{% endif %}
        # Om det finns priser för morgondagen ska stapeln vara smalare
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    # Visa pris för timme 2
    - obj: "p3b25"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[1] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[1] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "01" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    # Visa pris för timme 3
    - obj: "p3b26"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[2] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[2] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "02" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b27"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[3] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[3] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "03" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b28"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[4] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[4] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "04" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b29"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[5] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[5] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "05" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b30"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[6] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[6] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "06" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b31"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[7] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[7] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "07" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b32"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[8] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[8] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "08" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b33"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[9] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[9] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "09" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b34"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[10] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[10] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "10" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b35"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[11] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[11] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "11" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b36"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[12] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[12] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "12" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b37"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[13] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[13] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "13" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b38"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[14] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[14] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "14" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b39"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[15] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[15] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "15" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b40"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[16] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[16] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "16" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b41"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[17] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[17] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "17" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b42"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[18] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[18] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "18" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b43"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[19] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[19] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "19" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b44"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[20] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[20] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "20" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b45"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[21] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[21] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "21" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b46"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[22] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[22] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "22" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'
    - obj: "p3b47"
      properties:
        "y": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[23] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (247 - 179 * pris_i_procent) | int }}
        "h": >
          {% set today_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "today") %}{% set max_value = ((today_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((today_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
          {% set pris = today_values[23] %}
          {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
          {{ (1 + 179 * pris_i_procent) | int }}
        "bg_color": >
          {% if now().strftime("%H") == "23" %}#000080{% else %}#008000{% endif %}
        "w": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}7{% else %}15{% endif %}'

    # Staplar för morgondagens priser, om det finns värden för i morgon
    - obj: "p3b48"
      properties:
        # Om det finns elpriser för i morgon, så ska morgondagens elprisstaplar inte vara dolda, annars ska de döljas
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[0] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[0] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b49"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[1] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[1] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b50"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[2] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[2] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b51"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[3] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[3] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b52"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[4] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[4] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b53"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[5] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[5] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b54"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[6] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[6] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b55"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[7] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[7] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b56"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[8] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[8] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b57"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[9] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[9] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b58"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[10] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[10] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b59"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[11] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[11] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b60"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[12] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[12] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b61"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[13] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[13] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b62"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[14] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[14] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b63"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[15] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[15] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b64"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[16] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[16] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b65"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[17] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[17] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b66"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[18] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[18] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b67"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[19] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[19] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b68"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[20] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[20] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b69"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[21] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[21] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b70"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[22] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[22] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
    - obj: "p3b71"
      properties:
        "hidden": '{% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}0{% else %}1{% endif %}'
        "y": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[23] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (247 - 179 * pris_i_procent) | int }}
          {% endif %}
        "h": >
          {% if state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow_valid") %}
            {% set tomorrow_values = state_attr("sensor.nordpool_kwh_se4_sek_3_095_025", "tomorrow") %}{% set max_value = ((tomorrow_values | max + 0.49) // 0.5) * 0.5 %}{% set min_value = ((tomorrow_values | min) / 0.5) | round(0, 'floor') * 0.5 %}
            {% set pris = tomorrow_values[23] %}
            {% set pris_i_procent = (pris - min_value) / (max_value - min_value)  %}
            {{ (1 + 179 * pris_i_procent) | int }}
          {% endif %}
Leave a Comment