PoisonWaffle

Bedtime Automation

Apr 8th, 2024
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. alias: Bedtime
  2. description: "All off except bedrooms, close/lock doors"
  3. trigger:
  4. - platform: device
  5. domain: tasmota
  6. device_id: 5e97a98a51f8af5f3024befe92091cf2
  7. type: button_double_press
  8. subtype: button_1
  9. discovery_id: 40F52062F794_button_1_DOUBLE
  10. condition: []
  11. action:
  12. - service: light.turn_off
  13. target:
  14. area_id:
  15. - living_room
  16. - laundry_room
  17. - office
  18. - entry
  19. device_id:
  20. - 7b9401306fc30639482779df3a66aa96
  21. - dc1751d9726f844d9770a775e00e02f2
  22. - ea52372bc1cb2c4205053c684724cb4f
  23. - f82d274a8df3726a0c352cb246c76951
  24. data: {}
  25. - service: switch.turn_off
  26. target:
  27. area_id:
  28. - laundry_room
  29. - living_room
  30. - loft
  31. - garage
  32. - entry
  33. device_id:
  34. - 2eb072b8e5c0f8f734fb12356adda573
  35. - f82d274a8df3726a0c352cb246c76951
  36. data: {}
  37. - service: fan.set_percentage
  38. data:
  39. percentage: 75
  40. target:
  41. entity_id: fan.living_room_fan
  42. - if:
  43. - condition: state
  44. entity_id: lock.front_door
  45. state: unlocked
  46. then:
  47. - service: lock.lock
  48. data: {}
  49. target:
  50. entity_id: lock.front_door
  51. - if:
  52. - condition: state
  53. state: open
  54. entity_id: cover.garage_door
  55. then:
  56. - service: cover.close_cover
  57. data: {}
  58. target:
  59. entity_id: cover.garage_door
  60. - if:
  61. - condition: state
  62. entity_id: binary_sensor.garage_door_closed
  63. state: "off"
  64. then:
  65. - service: cover.close_cover
  66. data: {}
  67. target:
  68. entity_id: cover.garage_door
  69. - wait_for_trigger:
  70. - platform: state
  71. entity_id:
  72. - cover.garage_door
  73. to: closed
  74. timeout:
  75. hours: 0
  76. minutes: 0
  77. seconds: 12
  78. milliseconds: 0
  79. - if:
  80. - condition: state
  81. entity_id: cover.garage_door
  82. state: closed
  83. then:
  84. - service: notify.mobile_app_[my_phone]
  85. data:
  86. message: Garage door closed
  87. - if:
  88. - condition: state
  89. entity_id: binary_sensor.garage_door_closed
  90. state: "off"
  91. then:
  92. - service: notify.mobile_app_[my_phone]
  93. data:
  94. message: Garage door NOT closed!
  95. - service: alarmo.arm
  96. data:
  97. mode: home
  98. skip_delay: false
  99. force: true
  100. entity_id: alarm_control_panel.alarmo
  101. mode: single
  102.  
Advertisement
Add Comment
Please, Sign In to add comment