Advertisement
3km

en_light_control1.yaml

3km
Jan 29th, 2024
920
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.00 KB | None | 0 0
  1. alias: en_light_control1
  2. description: Прихожая управление светильником (Резерв)
  3. trigger:
  4.   - platform: state
  5.     entity_id: binary_sensor.m141_05
  6.     to: "on"
  7.     enabled: false
  8.   - platform: event
  9.     event_type: mega.binary
  10.     event_data:
  11.       entity_id: binary_sensor.m141_05
  12.       type: single
  13. condition:
  14.   - condition: state
  15.     entity_id: switch.control_mode
  16.     state: "on"
  17. action:
  18.   - service: light.toggle
  19.     entity_id:
  20.      - light.m141_29
  21.   - choose:
  22.       - conditions:
  23.           - condition: state
  24.             entity_id: light.m141_29
  25.             state: "off"
  26.         sequence:
  27.           - service: light.turn_on
  28.             entity_id:
  29.              - light.m141_29
  30.       - conditions:
  31.           - condition: state
  32.             entity_id: light.m141_29
  33.             state: "on"
  34.         sequence:
  35.           - service: light.turn_off
  36.             entity_id:
  37.              - light.m141_29
  38.     enabled: false
  39. mode: single
  40. initial_state: true
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement