Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: en_light_control
- description: Прихожая управление светильником
- trigger:
- - platform: event
- event_type: mega.binary
- event_data:
- entity_id: binary_sensor.m141_06
- type: single
- - platform: state
- entity_id: sensor.0xa4c138e305a1dd5f_action
- to: 1_single
- condition:
- - condition: state
- entity_id: switch.control_mode
- state: "on"
- enabled: false
- action:
- - choose:
- - conditions:
- - condition: state
- entity_id: light.yeelight_koridor
- state: "off"
- sequence:
- - service: light.turn_on
- data:
- brightness_pct: 100
- target:
- entity_id: light.yeelight_koridor
- - conditions:
- - condition: state
- entity_id: light.yeelight_koridor
- state: "on"
- sequence:
- - service: light.turn_off
- data: {}
- target:
- entity_id: light.yeelight_koridor
- - conditions:
- - condition: and
- conditions:
- - condition: state
- entity_id: light.yeelight_koridor
- state: unavailable
- - condition: state
- entity_id: switch.m141_13
- state: "off"
- sequence:
- - service: switch.turn_on
- data: {}
- target:
- entity_id: switch.m141_13
- - conditions:
- - condition: and
- conditions:
- - condition: state
- entity_id: light.yeelight_koridor
- state: unavailable
- - condition: state
- entity_id: switch.m141_13
- state: "on"
- sequence:
- - service: switch.turn_off
- data: {}
- mode: single
- initial_state: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement