kodebach / hacs-idm-heatpump

HACS integration for IDM heat pumps
MIT License
26 stars 2 forks source link

KeyError in set_power #147

Open kodebach opened 1 month ago

kodebach commented 1 month ago

With regards to the set_power function: This actually results in an error for me: Screenshot 2024-09-30 at 08 12 00

And then the Error Message (KeyError) Screenshot 2024-09-30 at 08 13 16

Am I doing something wrong here? Thanks again for your help!

Originally posted by @frederikbeekman in https://github.com/kodebach/hacs-idm-heatpump/discussions/144#discussioncomment-10793851

daemonenstall commented 1 month ago

I have no solution, but that is what is working for me. The snippet is from my automatisation.


data:
  acknowledge_risk: true
  target: sensor.idm_ipump_a3_11_aktueller_pv_uberschuss
  value: >-
    {{ -1 * ((states('sensor.kaco_power_now') | float) -
    states('sensor.haus_leistung') | float) / 1000 | round(3) }}
enabled: true
alias: Überschuss
action: idm_heatpump.set_power