Replies: 1 comment
-
For example like this. I'm using entsoe + Solcast. And adding / subtracting the price margins to get purchase price (marging+distribution fee + taxes), |batch(1)|map('sum',start=0.07312) and sales prices (margin subtracted) |batch(1)|map('sum',start = -0.0030) to EMHASS. I edited corresponding commands for nordpool (without margins or tax) and tested trigger_nordpool in HA's Developer Tools / Template, looks OK. Data for 27.11.2024 at 18:30. trigger_nordpool: "curl -i -H "Content-Type: application/json" -X POST -d '{"load_cost_forecast":[0.209, 0.155, 0.14, 0.107, 0.098, 0.091, 0.069, 0.069, 0.059, 0.045, 0.043, 0.051, 0.067, 0.163, 0.181, 0.181, 0.181, 0.181, 0.203, 0.204, 0.212, 0.198, 0.218, 0.2],"prod_price_forecast":[0.209, 0.155, 0.14, 0.107, 0.098, 0.091, 0.069, 0.069, 0.059, 0.045, 0.043, 0.051, 0.067, 0.163, 0.181, 0.181, 0.181, 0.181, 0.203, 0.204, 0.212, 0.198, 0.218, 0.2],"pv_power_forecast":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 55, 93, 108, 88, 50, 4, 0, 0] }' http://localhost:5000/action/dayahead-optim" You can test the shell_commands in Developer Tools / Actions Response: stdout: "HTTP/1.1 201 CREATED\r\nContent-Length: 45\r\nContent-Type: text/html; charset=utf-8\r\nDate: Wed, 27 Nov 2024 16:56:05 GMT\r\nServer: waitress\r\n\r\nEMHASS >> Action dayahead-optim executed..." configuration.yaml trigger_nordpool: "curl -i -H "Content-Type: application/json" -X POST -d '{"load_cost_forecast":{{((state_attr('sensor.nordpool', 'raw_today') | map(attribute='value') | list + state_attr('sensor.nordpool', 'raw_tomorrow') | map(attribute='value') | list))[now().hour:][:24] }},"prod_price_forecast":{{((state_attr('sensor.nordpool', 'raw_today') | map(attribute='value') | list + state_attr('sensor.nordpool', 'raw_tomorrow') | map(attribute='value') | list))[now().hour:][:24]}},"pv_power_forecast":{{((state_attr('sensor.solcast_pv_forecast_forecast_today', 'detailedHourly') | map(attribute='pv_estimate')|map('multiply',1000) |map('round') | list + state_attr('sensor.solcast_pv_forecast_forecast_tomorrow', 'detailedHourly') | map(attribute='pv_estimate') |map('multiply',1000) |map('round')| list))[now().hour:][:24]}} }' http://localhost:5000/action/dayahead-optim" trigger_entsoe: "curl -i -H "Content-Type: application/json" -X POST -d '{"load_cost_forecast":{{((state_attr('sensor.average_electricity_price_today', 'prices') | map(attribute='price')|batch(1)|map('sum',start=0.07312)| list))[now().hour:][:24] }},"prod_price_forecast":{{((state_attr('sensor.average_electricity_price_today', 'prices') | map(attribute='price')|batch(1)|map('sum',start = -0.0030)| list))[now().hour:][:24]}},"pv_power_forecast":{{((state_attr('sensor.solcast_pv_forecast_forecast_today', 'detailedHourly') | map(attribute='pv_estimate')|map('multiply',1000) |map('round') | list + state_attr('sensor.solcast_pv_forecast_forecast_tomorrow', 'detailedHourly') | map(attribute='pv_estimate') |map('multiply',1000) |map('round')| list))[now().hour:][:24]}} }' http://localhost:5000/action/dayahead-optim" trigger_solcast: "curl -i -H "Content-Type: application/json" -X POST -d '{"pv_power_forecast":{{((state_attr('sensor.solcast_pv_forecast_forecast_today', 'detailedHourly') | map(attribute='pv_estimate')|map('multiply',1000) |map('int') | list + state_attr('sensor.solcast_pv_forecast_forecast_tomorrow', 'detailedHourly') | map(attribute='pv_estimate') |map('multiply',1000) |map('int')| list))[now().hour:][:24] }}}' http://localhost:5000/action/dayahead-optim" dayahead_optim: "curl -i -H "Content-Type:application/json" -X POST -d '{}' http://localhost:5000/action/dayahead-optim" publish_data: "curl -i -H "Content-Type:application/json" -X POST -d '{}' http://localhost:5000/action/publish-data" And then an automation to fetch Solcast forecast before midnight
alias: Solcast update
And push prices and Solcast to EMHASS: alias: EMHASS Entsoe prices
|
Beta Was this translation helpful? Give feedback.
-
Hello all, I would like to use Emhass with Home Assistant and utilize Solcast and Nordpool integrations with it. Could you advice me how to get it working smootly with those? If I remember correctly, there were instructions how to get it working with Nordpool (Example using the Nordpool integration) or Solcast, but not with both at the same time. I would like to use day ahead optimization for two different loads.
Beta Was this translation helpful? Give feedback.
All reactions