55 lines
2.1 KiB
YAML
55 lines
2.1 KiB
YAML
---
|
|
- id: app_humidity_suppression_on
|
|
alias: '[App] Humidity Suppression ON'
|
|
initial_state: 'true'
|
|
condition:
|
|
- and:
|
|
- condition: state
|
|
entity_id: input_boolean.app_climate_humidity_suppression_status
|
|
state: 'on'
|
|
- condition: time
|
|
after: input_datetime.app_humidity_suppression_time_start
|
|
before: input_datetime.app_humidity_suppression_time_end
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id:
|
|
- sensor.climate_bathroom_master_01_humidity
|
|
- sensor.climate_bathroom_bedroom_01_humidity
|
|
- sensor.climate_bathroom_living_01_humidity
|
|
above: input_number.app_climate_humidity_suppression_humidity_level
|
|
action:
|
|
- service: fan.turn_on
|
|
target:
|
|
entity_id: |-
|
|
{% if area_id(trigger.entity_id) in label_areas('bathroom') -%}
|
|
{{ area_entities(area_name(trigger.entity_id)) | select('match', 'fan') | list | first }}
|
|
{%- endif %}
|
|
# - fan.bathroom_master
|
|
- service: notify.telegram_alex
|
|
data_template:
|
|
message: 'Humidity suppression has started in {{ area_name(trigger.entity_id) }} ({{ area_id(trigger.entity_id) }})'
|
|
|
|
- id: app_humidity_suppression_off
|
|
alias: '[App] Humidity Suppression OFF'
|
|
initial_state: 'true'
|
|
trigger:
|
|
- platform: time
|
|
at: input_datetime.app_humidity_suppression_time_end
|
|
- platform: numeric_state
|
|
entity_id:
|
|
- sensor.climate_bathroom_master_01_humidity
|
|
- sensor.climate_bathroom_bedroom_01_humidity
|
|
- sensor.climate_bathroom_living_01_humidity
|
|
below: input_number.app_climate_humidity_suppression_humidity_level
|
|
action:
|
|
- service: fan.turn_off
|
|
target:
|
|
entity_id: |-
|
|
{% if area_id(trigger.entity_id) in label_areas('bathroom') -%}
|
|
{{ area_entities(area_name(trigger.entity_id)) | select('match', 'fan') | list | first }}
|
|
{%- endif %}
|
|
# - fan.bathroom_master
|
|
- service: notify.telegram_alex
|
|
data_template:
|
|
message: 'Humidity suppression has done in {{ area_name(trigger.entity_id) }} ({{ area_id(trigger.entity_id) }})'
|