69 lines
2.0 KiB
YAML
69 lines
2.0 KiB
YAML
homeassistant:
|
|
customize:
|
|
package.node_anchors:
|
|
hvac_switch: &hvac_switch switch.ventilation
|
|
hvac_sensor: &hvac_sensor sensor.badrum_humidity
|
|
hvac_ref: &hvac_ref sensor.utomhus_humidity
|
|
common: &common
|
|
package: hvac
|
|
sensor.vpump_dir0:
|
|
<<: *common
|
|
sensor.vpump_dir1:
|
|
<<: *common
|
|
sensor.vpump_dir2:
|
|
<<: *common
|
|
|
|
automation:
|
|
- alias: HVAC - Timer off
|
|
initial_state: False
|
|
trigger:
|
|
- platform: state
|
|
entity_id: *hvac_switch
|
|
to: 'on'
|
|
for:
|
|
hours: 1
|
|
action:
|
|
- service: homeassistant.turn_off
|
|
data:
|
|
entity_id: *hvac_switch
|
|
- service: script.info_message
|
|
data: { message: "Stänger av takfläkt"}
|
|
|
|
- alias: HVAC - Auto on
|
|
initial_state: True
|
|
trigger:
|
|
- platform: template
|
|
value_template: "{{ states('sensor.badrum_humidity')|int > (states('sensor.vardagsrum_humidity')|int + 10) }}"
|
|
action:
|
|
- service: homeassistant.turn_on
|
|
data:
|
|
entity_id: *hvac_switch
|
|
- service: script.info_message
|
|
data: { message: "Fuktigt - takfläkt på" }
|
|
- alias: HVAC - Auto off
|
|
initial_state: True
|
|
trigger:
|
|
- platform: template
|
|
value_template: "{{ states('sensor.badrum_humidity')|int < (states('sensor.vardagsrum_humidity')|int + 10) }}"
|
|
for:
|
|
minutes: 15
|
|
action:
|
|
- service: homeassistant.turn_off
|
|
data:
|
|
entity_id: *hvac_switch
|
|
- service: script.info_message
|
|
data: { message: "Torrt - takfläkt av" }
|
|
|
|
sensor:
|
|
- platform: template
|
|
sensors:
|
|
vpump_dir0:
|
|
value_template: "{{ state_attr('binary_sensor.vibration_sensor', 'orientation')[0]|float }}"
|
|
unit_of_measurement: "r.u."
|
|
vpump_dir1:
|
|
value_template: "{{ state_attr('binary_sensor.vibration_sensor', 'orientation')[1]|float }}"
|
|
unit_of_measurement: "r.u."
|
|
vpump_dir2:
|
|
value_template: "{{ state_attr('binary_sensor.vibration_sensor', 'orientation')[2]|float }}"
|
|
unit_of_measurement: "r.u."
|