dala318 / nordpool_planner

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

can u try to explain: var_search_length? #10

Closed flippz closed 1 year ago

flippz commented 1 year ago

I cant get my head around this integration. Could you please explain var_search_length again in other words than in the readme? Maybe Swedish would help as im Norwegian.

dala318 commented 1 year ago

It will be updated in pull request #9 and renamed to "var_search_length_entity"

So the idea is that instead of setting a fixed duration ahead in the configuration.yaml you point it to an entity (typically an "input_number" as example below and then the value of that sensor get used). Maybe more handy is the "var_duration_entity" which can be set how many hours during the night high electricity must be selected.

The input number:

input_number:
  np_duration:
    name: Slider
    initial: 2
    min: 0
    max: 24
    step: 1

And then your nordpool_planner:

binary_sensor:
  - platform: nordpool_planner
    entity_id: moving_1
    nordpool_entity: sensor.nordpool_kwh_se3_sek_3_10_025
    var_search_length: input_number.np_duration