Hi! Tere is solution,how to automate devices based on Nordpool hourly prices.Sry about my english,so,if any questions,maybe i dont understood exactly.Please be patient.There is a yaml,where you can control any device,You can set hours,when to wacth prises and how many hours to sort out. I hope you understand what i want to say.
alias: Nordpool per hour
description: ''
trigger:
- platform: state
entity_id: sensor.nordpool_kwh_ee_eur_3_10_02
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: >-
{{ ([(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[1]
|
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[2] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[3] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[4] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[5] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[6] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[7] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[8] |
float(default=0))] | sort)[4] >=
state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','current_price') | float }}
- condition: time
after: '00:00'
before: '08:00'
sequence:
- service: light.turn_on
target:
entity_id: light.lumi_lumi_remote_b186acn01_on_off
- conditions:
- condition: template
value_template: |2-
{{ ([(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[8] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[9] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[10] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[11] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[12] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[13] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[14] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[15] |
float(default=0)),
(state_attr('sensor.nordpool_kwh_ee_eur_3_10_02','today')[16] |