-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbathroom.yaml
More file actions
25 lines (23 loc) · 812 Bytes
/
bathroom.yaml
File metadata and controls
25 lines (23 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
sensor:
- platform: statistics
name: Main Bathroom Humidity Average Linear 24h
entity_id: sensor.weather_sensor_bathroom_humidity
state_characteristic: average_linear
max_age:
hours: 24
template:
- binary_sensor:
- name: Main Bathroom Humidity Threshold
state: >-
{% set humid = states('sensor.weather_sensor_bathroom_humidity')|int(0) %}
{% set avg = states('sensor.main_bathroom_humidity_average_linear_24h')|int(0) %}
{% set threshold = 5 %}
{{ (humid - avg) > threshold }}
binary_sensor:
- platform: trend
sensors:
main_bathroom_humidity_trend:
entity_id: sensor.weather_sensor_bathroom_humidity
friendly_name: Main Bathroom Humidity Trend
min_gradient: 0.05
device_class: moisture