Hiya,
I’m trying to get my home battery to charge when the price is lowest in 24h and to discharge when price is highest in 24h.
I therefore need to compare the value from sensor “sensor.huis_electricity_price” to the attribute of the same sensor “Max price”.
How would I do this in the GUI? I tried, as a first step, a template sensor which unfortunately does not output a value. I then wanted to compare the huis_electricity_price sensor value to the value of this newly created sensor to create a true or false sensor so I can trigger an automation.
{{ state_attr(‘huis_electricity_price’, ‘Max_price’) | float }}