I have been trying to use hass_variable to save start and end energy values for my dishwasher so that I can calculate costs of cycles within an automation. .
So far, I have yet to populate a variable successfully
So it does seem to have recognised the 0.076 value but the dishwasher_start_energy variable remains at the value 0.
I have tried the statement without the “float” and also using “value” instead of “value_template” but the result is the same i.e.no update to the value. I am struggling and need help.
Update: I have found the following error in the log:
wait() got an unexpected keyword argument 'loop'
I guess that is a python type error but no idea what to do.
Here, the 4th line is indented by 2 extra spaces. This may not cause your script to fail, but YAML is VERY particular about indentation, so pay close attention to this.
Admittedly, i had just abandoned this variable method and had used the input_number type instead. Althoigh not complete yet (ie final cost formula yet to set up using the wh rather than kwh value, so i am dealing in integers, and my tarriff - will hunt around to see if it is anything more than a multiplication), the integer values for the number of wh used seems correct so think i will stick wth this.