I have an energy sensor named sensor.strom_verbrauch_haus and want to create the following:
if day = Monday, Tuesday, Wednesday, Thursday & Friday and time is between 6:00 - 22:00 then add value to sensor.strom_verbrauch_strom_ht - else add value to sensor.strom_verbrauch_nt
if day = Saturday and time = 9:00 - 22:00 then add value to sensor.strom_verbrauch_strom_ht - else add value to sensor.strom_verbrauch_nt - else add value to sensor.strom_verbrauch_nt
if day = Sunday then add value to sensor.strom_verbrauch_nt
Time sensor => sensor.time
Weekday sensor => sensor.weekday