dala318 / nordpool_planner

nordpool_planner custom component for Home Assistant
MIT License
18 stars 4 forks source link

Cheapest hour time range #22

Closed swepan closed 9 months ago

swepan commented 11 months ago

Is it possible to have a sensor that shows calculated cheapest hours? Ex. cheapest hours start at 21:00 and last until 03:00. Like attribute starts_at.

dala318 commented 9 months ago

For sure, can have a look at it. But can also be solved by a template sensor

- sensor:
    - name: "Cheap at"
      unique_id: electricity_cheap_at
      state: "{{ state_attr('binary_sensor.nordpool_planner_entity_id', 'starts_at') }}"

Since create individual binary_sensors by the settings it's not obvious how to copy those settings to value sensors.

dala318 commented 9 months ago

As each nordpool_panner entity is configured manually as a binary_sensor there is no intuitive way to create these sensor cloned with numerical date-time values. Could be solved together with #23. Until then the template-sensor above will be the easiest solution.