Advertisement
Guest User

alarm google home

a guest
Apr 10th, 2024
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.51 KB | None | 0 0
  1. # ------------------------------------------------------------------------------------------ #
  2. # Lines starting with “#” are comments and will be ignored by the automation.
  3. # Indentation determines hierarchy within the script.
  4. # Visit g.co/home/script-editor-docs for full documentation.
  5. # ------------------------------------------------------------------------------------------ #
  6.  
  7. metadata:
  8. name: Alarm # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
  9. description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”
  10.  
  11. automations:
  12. # “starters” and “actions” are required; “conditions” are optional.
  13. # Use Ctrl + Space to see autocomplete suggestions.
  14.  
  15. # ---- STARTERS ---- #
  16. # Starters describe events that will start the automation.
  17. # To add more than one starter, duplicate the "- type" section under "starters".
  18. # If you add multiple starter events, any one of them happening will start the automation.
  19. starters:
  20. - type: device.state.OpenClose # For devices that support opening and closing, and in some cases opening and closing partially or potentially in more than one direction.
  21. device: Back Door - Kitchen
  22. state: openPercent
  23. # [available operators: is, isNot]
  24. is: 100
  25.  
  26. - type: device.state.OpenClose # For devices that support opening and closing, and in some cases opening and closing partially or potentially in more than one direction.
  27. device: Front Door - Front Door
  28. state: openPercent
  29. # [available operators: is, isNot]
  30. is: 100
  31.  
  32. # ---- CONDITIONS ---- #
  33. # Conditions are optional. Delete this section if it’s empty.
  34. # Conditions will prevent an automation from starting if the conditions aren’t met.
  35. # See g.co/home/script-editor-docs for documentation about how to use logical operators like “and”, “or”, and “not”.
  36. condition:
  37. type: home.state.HomePresence # For devices that support opening and closing, and in some cases opening and closing partially or potentially in more than one direction.
  38. state: homePresenceMode
  39. # Indicates the percentage that a device is opened, where 0 is closed and 100 is fully open. [available operators: is, isNot, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo]
  40. is: AWAY
  41.  
  42. # ---- ACTIONS ---- #
  43. # Actions will start when a starter event takes place and all conditions are met.
  44. # Actions will start in the order they appear in the script and with any delay specified.
  45. # To add more than one action, duplicate the "- type" section under "actions".
  46. actions:
  47. - type: home.command.Notification
  48. title: Alarm Triggered
  49. body: A door has been opened while you were away
  50. members:
  51.  
  52. - type: device.command.SetVolume # Set the volume of a given device.
  53. # The target volume level.
  54. volumeLevel: 100
  55. devices: Living Room speaker - Living Room
  56.  
  57. - type: device.command.SetVolume # Set the volume of a given device.
  58. # The target volume level.
  59. volumeLevel: 100
  60. devices: Master bedroom speaker - Master bedroom
  61.  
  62. - type: device.command.SetVolume # Set the volume of a given device.
  63. # The target volume level.
  64. volumeLevel: 100
  65. devices: Utility Room - Utility
  66.  
  67. - type: device.command.SetVolume # Set the volume of a given device.
  68. # The target volume level.
  69. volumeLevel: 100
  70. devices: Kitchen display - Kitchen
  71.  
  72. - type: assistant.command.Broadcast
  73. message: Intruder Alert! Intruder Alert! Intruder Alert! Intruder Alert! Police have been dispatched to your location
  74. devices: Living Room speaker - Living Room
  75.  
  76. - type: assistant.command.Broadcast
  77. message: Intruder Alert! Intruder Alert! Intruder Alert! Intruder Alert! Police have been dispatched to your location
  78. devices: Master bedroom speaker - Master bedroom
  79.  
  80. - type: assistant.command.Broadcast
  81. message: Intruder Alert! Intruder Alert! Intruder Alert! Intruder Alert! Police have been dispatched to your location
  82. devices: Utility Room - Utility
  83.  
  84. - type: assistant.command.Broadcast
  85. message: Intruder Alert! Intruder Alert! Intruder Alert! Intruder Alert! Police have been dispatched to your location
  86. devices: Kitchen display - Kitchen
  87.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement