Hi Guy’s, I want to update a number box (input_number.lux_hw
) with a sensor value (sensor.multi_s6_hw2_illuminance_2
), but I want to change the value of the (input_number.lux_hw
) by -5 if a light is on. I’ve been trying with templates ect, but haven’t come up with anything that works. any help much appreciated
Use the service: input_number.set_value
You can test it out in developer tools > services
Here it is:
- service: input_number.set_value
target:
entity_id: input_number.lux_hw
data:
value: "{{ (states('sensor.multi_s6_hw2_illuminance_2') | int(default=0)) - 5 }}"
Hi browetd, thanks for your help. Mark