Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

automations.yaml 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. - alias: "Welcome Josh if he gets home"
  2. condition: []
  3. trigger:
  4. - entity_id: device_tracker.josh
  5. from: not_home
  6. platform: state
  7. to: home
  8. action:
  9. service: notify.ios_jphone
  10. data:
  11. message: "Hi Josh! Welcome Home \U0001F3E0"
  12. data:
  13. subtitle: "What can I do for you?"
  14. - alias: "Send notification if Margit gets home"
  15. condition: []
  16. trigger:
  17. - entity_id: device_tracker.margit
  18. from: not_home
  19. platform: state
  20. to: home
  21. action:
  22. service: notify.ios_jphone
  23. data:
  24. message: "Margit arrived at home."
  25. data:
  26. subtitle: "No problem!"
  27. - alias: "Hass Startup Notification"
  28. trigger:
  29. - platform: homeassistant
  30. event: start
  31. action:
  32. service: notify.ios_jphone
  33. data:
  34. title: "Status Update"
  35. message: "HomeAssitant has restarted"
  36. data:
  37. subtitle: "All services should be up now."
  38. - alias: 'Update Available Notifications'
  39. trigger:
  40. platform: state
  41. entity_id: updater.updater
  42. action:
  43. service: notify.ios_jphone
  44. data:
  45. message: 'Update for Home Assistant is available.'
  46. - alias: "Notify about phone state"
  47. trigger:
  48. platform: state
  49. entity_id: sensor.phone
  50. condition:
  51. condition: state
  52. entity_id: sensor.phone
  53. state: 'ringing'
  54. action:
  55. service: notify.ios_jphone
  56. data:
  57. title: "Phone"
  58. message: 'Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})'
  59. - alias: "Enable Subwoofer if Desktop Plays Music from Spotify"
  60. trigger:
  61. platform: state
  62. entity_id: media_player.spotify
  63. condition:
  64. - condition: template
  65. value_template: '{{ states.media_player.spotify.attributes.source == "DESKTOP-TMIMKG7" }}'
  66. - condition: state
  67. entity_id: media_player.spotify
  68. state: 'playing'
  69. action:
  70. service: switch.turn_on
  71. entity_id: switch.subwoofer
  72. - alias: Turn on light when there is movement
  73. trigger:
  74. platform: state
  75. entity_id: binary_sensor.pir
  76. to: 'on'
  77. action:
  78. service: light.turn_on
  79. entity_id: light.room_light
  80. - alias: Turn off light 10 minutes after last movement
  81. trigger:
  82. platform: state
  83. entity_id: binary_sensor.pir
  84. to: 'off'
  85. for:
  86. minutes: 10
  87. action:
  88. service: light.turn_off
  89. entity_id: light.room_light
  90. - alias: Turn off subwoofer when PC is off
  91. trigger:
  92. platform: state
  93. entity_id: switch.desktop
  94. to: 'off'
  95. action:
  96. service: switch.turn_off
  97. entity_id: switch.subwoofer
  98. - alias: "Porch Animation Speed"
  99. initial_state: True
  100. hide_entity: True
  101. trigger:
  102. - platform: state
  103. entity_id: input_number.porch_animation_speed
  104. action:
  105. - service: mqtt.publish
  106. data_template:
  107. topic: "bruh/porch/set"
  108. payload: '{"transition":{{ trigger.to_state.state | int }}}'