#help with yaml syntax or wrong automation option

1 messages · Page 1 of 1 (latest)

fathom glen
#

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"

#

just noticed: the when condition is also incorrect, as i want it to always update whenever the sensor updates

fathom glen
#

If there was a way to continuously do sensor1 + sensor2 = newvalue, that would also be great

dusty hornetBOT
#

The XY problem is asking about your attempted solution rather than your actual problem.

fathom glen
#

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

dense tundra
#

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

west peak
#

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?

fathom glen