Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. ##################################################
  2. - alias: Tự động bật đèn phòng tắm 2
  3. trigger:
  4. - entity_id: binary_sensor.motion_sensor_158d00024ee7c1
  5. platform: state
  6. to: "on"
  7. action:
  8. - service: switch.turn_on
  9. entity_id:
  10. - switch.wall_switch_left_158d00023a935b
  11. ##################################################
  12. - alias: Tự động tắt đèn, quạt phòng tắm 2
  13. trigger:
  14. - entity_id: binary_sensor.motion_sensor_158d00024ee7c1
  15. platform: state
  16. to: "off"
  17. for: 00:03:00
  18. action:
  19. - service: switch.turn_off
  20. entity_id:
  21. - switch.wall_switch_right_158d00023a935b
  22. - switch.wall_switch_left_158d00023a935b
  23. ##################################################
  24. - alias: Tự động bật quạt hút phòng tắm 2
  25. initial_state: true
  26. trigger:
  27. - platform: state
  28. entity_id: switch.wall_switch_left_158d00023a935b
  29. from: 'off'
  30. to: 'on'
  31. for: 00:02:00
  32. action:
  33. - service: switch.turn_on
  34. entity_id: switch.wall_switch_right_158d00023a935b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement