I have sensor - sensor.multi_sensor, this is humidity sensor (0-100%) in room. And light.qubino_goap_zmnhvdx_flush_dimmer_0_10v_level_14 (0-255) - this is Qubino dimmer 0-10V (connected to humidity control 0-10V).
I want to do automation:
trigger:
value sensor.multi_sensor change
action:
set light.qubino_goap_zmnhvdx_flush_dimmer_0_10v_level_14 = (sensor.multi_sensor * 255/100)
How often does that sensor change? You sure you don’t want to limit how often this happens?
You want to set what exactly to that state? The brightness?
- alias: Humidity
trigger:
# Will trigger on ALL state and attribute changes if you don't specify a state
platform: state
entity_id: sensor.multi_sensor
action:
service: light.turn_on
data_template:
entity_id: light.qubino_goap_zmnhvdx_flush_dimmer_0_10v_level_14
# get the value of the sensor.multi_sensor (which is also this trigger).
# convert it to an int, then multiply by 255 and divide by 100 to convert it to 0-255 range.
# Finally, round the output to the nearest whole number by converting it to an int again.
brightness: "{{ ((states(trigger.entity_id) | int * 255 ) / 100) | int }}"