Based on how much solar I sell back to grid during the day, will determine how much power I can use at night for my Ducted AC as that’s the major power consumption when we go to bed.
Do for Example
Sold 32kWh
Bought: 15kWh
Left over: 17kwh
So when I press my Automation called Going to Bed, it turns on my Ducted AC script for sleeping.
I also have my Ducted AC turning off when Temp reachs 20, and on when above 23, so I would like the automation to factor in that.
So basically the AC can turn and off based on the temp, but when I consumer 17kwh from say 9pm to 6am that the AC can no longer turn on???
I would be happy to pay for this or even have it turned into a blueprint as I can’t see why something like this wouldn’t be usefully.
I figure I’ll need to create a templates to calculate
Left over: 17kwh
Invalid config for [template]: invalid template (TemplateSyntaxError: unexpected end of template, expected 'end of print statement'.) for dictionary value @ data['sensor'][8]['state']. Got "{{ states('sensor.energy_real_produced')|float(0) - states('sensor.power_consumed')|float(0)". (See /config/configuration.yaml, line 443).
Just wanted to say thank you! i dont understand the template you created as coding is somehting i ahvent never done, but i finally got my Grid Total entity Learnt alot!
My next stage is to try create tariffs based on my electricity contract
I have one more favour
Below is my solar feed it tarriffs. Any idea how to create these?
AGL Retailer Feed-in Tariff for the first 14kWh per day (<14kWh per day)
10 cents/kWh exported
AGL Retailer Feed-in Tariff Thereafter (>14kWh per day)
5 cents/kWh exported
For that calculation, I’d just create an if else template. Check the dev tools and template section for an example. The logic I’m thinking here if the following (psudeo code):
Keep in mind I haven’t tried this so you may have to fix the syntax. I would also suggest creating numeric helper entities for your tariff values and using those entity IDs in the above logic. This would allow you to adjust the tariff values from the UI