Files
hassio-configuration/configuration/automation/switch_fan_bedroom_olivia.yaml
2025-02-07 12:46:24 -05:00

35 lines
877 B
YAML

---
- id: zwave_bedroom_guest_fan_turn_on
initial_state: "true"
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
property: "scene"
property_key: "002"
value: "KeyPressed2x"
condition:
condition: template
value_template: '{{ trigger.event.data.node_id == 22 }}'
action:
- service: fan.set_percentage
entity_id: fan.bedroom_olivia
data:
percentage: 33
- id: zwave_bedroom_guest_fan_turn_off
initial_state: 'true'
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
property: "scene"
property_key: "001"
value: "KeyPressed2x"
condition:
condition: template
value_template: '{{ trigger.event.data.node_id == 22 }}'
action:
- service: fan.turn_off
entity_id: fan.bedroom_olivia