I think i’m making things more complicated than nescessary but i need some help with the folowing:
In my bathroom i have ventilation triggered by a seperate humidity sensor. This works fine, but now i want the trigger value to change with the metrological seasons.
So far:
i made a sensor to determine the metrological season which gives me a value of summer,spring, autumn or winter.
Next i created a sensor [sensor.lv_drempelwaarde] to set the trigger value based on the season. For example: ‘winter’ gives a value of 69 and summer a value of 80.
So far so good and working.
The big question:
How do i use the value from the sensor [sensor.lv_drempelwaarde] in my automation to control the ventilation?
My current automation:
- id: '1538217836354'
alias: Badkamer Ventileren
trigger:
- above: '73' ## This value has to be the value from [sensor.lv_drempelwaarde] ##
entity_id: sensor.vochtsensor_badkamer # This is my humidity sensor
platform: numeric_state
condition: []
action:
- alias: ''
data: {}
entity_id: switch.relais_badkamer_ventilator_switch_2
service: switch.turn_on
So to be short:
trigger:
above: ‘73’ <-- the ‘73’ must become the value from my custom sensor [sensor.lv_drempelwaarde]
Feel free to make it as a solution
A value_template basically performs a calculation based on one or more HA entities based on status, attributes, etc. Takes a bit getting used to it but very powerful