Price entity & Power->Energy

Here is an example using holidays for Slovenia:

    - name: "Energy Price"
      unique_id: "energy_price"
      state: >
        {% set holidays =
            ['2021-11-01', '2022-02-08', '2022-04-18', '2022-04-27', '2022-05-02', '2022-08-15', '2022-10-31', '2022-11-01',
             '2022-12-26', '2023-01-02', '2023-02-08', '2023-04-10', '2023-04-27', '2023-05-01', '2023-05-02', '2023-08-15',
             '2023-10-31', '2023-11-01', '2023-12-25', '2023-12-26', '2024-01-01', '2024-01-02', '2024-02-08', '2024-04-01',
             '2024-05-01', '2024-05-02', '2024-06-25', '2024-08-15', '2024-10-31', '2024-11-01', '2024-12-25', '2024-12-26',
             '2025-01-01', '2025-01-02', '2025-04-21', '2025-05-01', '2025-05-02', '2025-06-25', '2025-08-15', '2025-10-31',
             '2025-12-25', '2025-12-26', '2026-01-01', '2026-01-02', '2026-04-06', '2026-04-27', '2026-05-01', '2026-06-25',
             '2026-12-25', '2027-01-01', '2027-02-08', '2027-03-29', '2027-04-27', '2027-06-25', '2027-11-01', '2028-02-08',
             '2028-04-17', '2028-04-27', '2028-05-01', '2028-05-02', '2028-08-15', '2028-10-31', '2028-11-01', '2028-12-25',
             '2028-12-26', '2029-01-01', '2029-01-02', '2029-02-08', '2029-04-02', '2029-04-27', '2029-05-01', '2029-05-02',
             '2029-06-25', '2029-08-15', '2029-10-31', '2029-11-01', '2029-12-25', '2029-12-26', '2030-01-01', '2030-01-02',
             '2030-02-08', '2030-04-22', '2030-05-01', '2030-05-02', '2030-06-25', '2030-08-15', '2030-10-31', '2030-11-01',
             '2030-12-25', '2030-12-26']
        %}{% if now().weekday() < 5 and 6 < now().hour < 22 and now().date().isoformat() not in holidays %}0.1286124{% else %}0.0836188{% endif %}
      unit_of_measurement: EUR/kWh
1 Like