Advertisement
Guest User

Untitled

a guest
Jun 18th, 2025
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. alias: Weather Alerts
  2. description: ""
  3. triggers:
  4. - entity_id:
  5. - sensor.weatheralerts_1_active_alerts
  6. trigger: state
  7. conditions:
  8. - condition: template
  9. value_template: "{{ trigger.to_state.state | int > trigger.from_state.state | int }}"
  10. actions:
  11. - parallel:
  12. - if:
  13. - condition: state
  14. entity_id: schedule.quiet_time_hours
  15. state: "off"
  16. then:
  17. - sequence:
  18. - metadata: {}
  19. data:
  20. preannounce: true
  21. preannounce_media_id: >-
  22. https://depsjgbyptrpahqike5brkz6xal30abd.ui.nabu.casa/local/mp3/usa-eas-alarm-249125.mp3
  23. message: >
  24. {% set idx = states('sensor.weatheralerts_1_active_alerts')
  25. | int %} {% set alert = 'sensor.weatheralerts_1_alert_' ~
  26. idx %} {{ state_attr(alert, 'spoken_title') }}
  27.  
  28. {{ state_attr(alert, 'spoken_message') }}
  29. target:
  30. device_id:
  31. - 973e40faee86d5d6dcffaf72f58f6d73
  32. - 38acae3bacfe0c3b2c31f5bc7ae453cc
  33. - 044b5980efd47baf8c27a8fbcf1abe6e
  34. - 6f648a6952ef9fa1343184e70a62fad7
  35. action: assist_satellite.announce
  36. - metadata: {}
  37. data:
  38. preannounce: false
  39. media_id: >-
  40. https://depsjgbyptrpahqike5brkz6xal30abd.ui.nabu.casa/local/mp3/eas.mp3
  41. target:
  42. device_id:
  43. - 973e40faee86d5d6dcffaf72f58f6d73
  44. - 38acae3bacfe0c3b2c31f5bc7ae453cc
  45. - 044b5980efd47baf8c27a8fbcf1abe6e
  46. - 6f648a6952ef9fa1343184e70a62fad7
  47. action: assist_satellite.announce
  48. - parallel:
  49. - metadata: {}
  50. data:
  51. title: >
  52. {% set idx = states('sensor.weatheralerts_1_active_alerts') |
  53. int %} {% set alert = 'sensor.weatheralerts_1_alert_' ~ idx %}
  54. {{ state_attr(alert, 'alert_title') }}
  55. message: >
  56. {% set idx = states('sensor.weatheralerts_1_active_alerts') |
  57. int %} {% set alert = 'sensor.weatheralerts_1_alert_' ~ idx %}
  58. {{ state_attr(alert, 'alert_instruction') }}
  59. action: notify.mobile_app_noah_s_phone
  60. mode: single
  61.  
  62.  
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement