Quite the new guy here, so any feedback and tips are much appreciated.
Goal:
Let my Marstek PIB charge when the price of €/kWh drops below a certain value.
Thanks for the advice!
Indeed, i’m using the build-in AI-tool from Marstek but the feature lacks options.
I’d combine this automation with other input values like: current state of charge etc
Any errors you notice in the code why the value of 800 doesn’t change?
The value 800 = setting the charging power to 800w, so far my goal i want to achieve. This way the battery charges whenever the treshold of the price is reached.
It could be higher but we dont consume that much energy at home.
Setting it higher would lead to a full battery and solar power during the day would go to the grid instead of the battery.
I don’t think it’s correct to use number.set_value on a sensor entity; I don’t think that call is doing anything and it’s probably leaving an error in your logs.