Advertisement
3km

en_light_control.yaml

3km
Jan 29th, 2024 (edited)
996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.84 KB | None | 0 0
  1. alias: en_light_control
  2. description: Прихожая управление светильником
  3. trigger:
  4.   - platform: event
  5.     event_type: mega.binary
  6.     event_data:
  7.       entity_id: binary_sensor.m141_06
  8.       type: single
  9.   - platform: state
  10.     entity_id: sensor.0xa4c138e305a1dd5f_action
  11.     to: 1_single
  12. condition:
  13.   - condition: state
  14.     entity_id: switch.control_mode
  15.     state: "on"
  16.     enabled: false
  17. action:
  18.   - choose:
  19.       - conditions:
  20.           - condition: state
  21.             entity_id: light.yeelight_koridor
  22.             state: "off"
  23.         sequence:
  24.           - service: light.turn_on
  25.             data:
  26.               brightness_pct: 100
  27.             target:
  28.               entity_id: light.yeelight_koridor
  29.       - conditions:
  30.           - condition: state
  31.             entity_id: light.yeelight_koridor
  32.             state: "on"
  33.         sequence:
  34.           - service: light.turn_off
  35.             data: {}
  36.             target:
  37.               entity_id: light.yeelight_koridor
  38.       - conditions:
  39.           - condition: and
  40.             conditions:
  41.               - condition: state
  42.                 entity_id: light.yeelight_koridor
  43.                 state: unavailable
  44.               - condition: state
  45.                 entity_id: switch.m141_13
  46.                 state: "off"
  47.         sequence:
  48.           - service: switch.turn_on
  49.             data: {}
  50.             target:
  51.               entity_id: switch.m141_13
  52.       - conditions:
  53.           - condition: and
  54.             conditions:
  55.               - condition: state
  56.                 entity_id: light.yeelight_koridor
  57.                 state: unavailable
  58.               - condition: state
  59.                 entity_id: switch.m141_13
  60.                 state: "on"
  61.         sequence:
  62.           - service: switch.turn_off
  63.             data: {}
  64. mode: single
  65. initial_state: true
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement