I want a new value to be either a copy of a sensor or 0 depending on a boolean.
I already made a helper input_number named power_tarief1_sep to be the outputvalue
In the "then do" field i would select "input number set", select my helpervalue as target. In my mind it should be possible to start typing the sensor entity in the "value" field, but i cant. I just found out i can change it to yaml mode, but i think my brackets might be wrong, since its giving me errors when trying to "run action"
#help with yaml syntax or wrong automation option
1 messages · Page 1 of 1 (latest)
just noticed: the when condition is also incorrect, as i want it to always update whenever the sensor updates
If there was a way to continuously do sensor1 + sensor2 = newvalue, that would also be great
The XY problem is asking about your attempted solution rather than your actual problem.
ok, so more backstory?
This is to make my energy dashboard better
my grid electricity meter gives 2 sensors in kWh for 2 electricity prices (one for low and one for high) , but only one power measurement for realtime monitoring (kW). It also gives me a state to let me know if the normal or low price is active right now. https://www.home-assistant.io/integrations/dsmr/ (smart meter)
as far as i can see i have 2 options:
use each price as a separate grid connection in the energy dashboard, and split my realtime power usage depending on the "normal" or "low" state
or
add the 2 kWh values together so i only have to use one electricity grid connection
Do your 2 kWh sensors ever reset to zero? If not, you could just use a “combine the state” helper set to “sum” to add them up
The realtime sensor in kW doesn't need to be set up for different tarrifs. I also have two different tarrifs
Why do you want two different power sensors?
Oh, i didn't know this exists. This should solve it, thanks!