Hi All,
I want try the trend sensor to manage something’s.
I have a humidity sensor in bathroom and want create automation when the humidity is rising with 10% and stop the fan when its going down with 10%
example:
Normal humidity is lets say 50% and it takes 10-30 seconds to hit the 60% when the shower is in use
When fan is on the humidity from 60% will go down back to 50% between 5-10minutes (depend on how long you shower)
The humidity sensor will send every 5 seconds the new value, also when the value is the same.
I was trying to understand the settings of the trend sensor:
10% rising / 30 seconds = 0.33 gradient. 30sec / 5sec = 6 samples (new values from the hum sensor)
- platform: trend
sensors:
test_trend_up:
friendly_name: "TEST Trend up"
device_class: heat
max_samples: 6
entity_id: sensor.bathroom_humidity
sample_duration: 20
min_gradient: 0.33
10% go down / 10min (600sec) = -0.01666 gradient. 600sec / 5sec = 120 samples (new values from the hum sensor)
- platform: trend
sensors:
test_trend_down:
friendly_name: "TEST Trend down"
device_class: cold
max_samples: 120
entity_id: sensor.bathroom_humidity
sample_duration: 600
min_gradient: -0.01666
Is this the right calculation and settings or not? how can assist me with this?
Thanks