Replies: 6 comments 1 reply
-
|
I backed up my current weatheralerts folder and copied each of the files in (Copy your weatheralerts folder to weatheralerts.bak. Select each file in the github code folder in turn, select RAW, copy all, ssh to your weatheralerts folder and either edit or add the file, delete any current contents, and paste in the copied code. Restart HA). You need ALL the files, not just The integration seems to work, although we don't currently have any active alerts here at the moment. |
Beta Was this translation helpful? Give feedback.
-
|
I will get my latest updated code uploaded to github tonight. It may not be
an exact drop-in replacement due to the enhancements made. The current code
update in the repo does have some issues that have been fixed and I'll
upload the fixes tonight.The existing yaml package and yaml config should
no longer be needed as much of the data the yaml package added is now
included in the main sensor and the config is much easier and done through
the HA setup UI now. Initially, an automation blueprint will be available
to handle persistent notifications. Once I get the code uploaded I'll post
a quick install and upgrade note here before...I still need to get proper
documentation done before I make it an official release.
…On Mon, Jan 12, 2026, 9:45 AM kaijk ***@***.***> wrote:
I backed up my current weatheralerts folder and copied each of the files
in code to custom_components/weatheralerts; then restarted HA.
(Copy your weatheralerts folder to weatheralerts.bak. Select each file in
the github code folder in turn, select RAW, copy all, ssh to your
weatheralerts folder and either edit or add the file, delete any current
contents, and paste in the copied code. Restart HA).
You need ALL the files, not just sensor.py. This was a major rewrite.
The integration seems to work, although we don't currently have any active
alerts here at the moment.
—
Reply to this email directly, view it on GitHub
<#90 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQTNLKVEAY3XIB55P6NDNL4GO6QFAVCNFSM6AAAAACRGEOC3CVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNBXGY4TAMY>
.
You are receiving this because you were mentioned.Message ID:
<custom-components/weatheralerts/repo-discussions/90/comments/15476903@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
Look forward to the new enhancements. Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
I have updated the README.md and CHANGELOG.md files with some info and initial documentation for the new integration code. None of the documentation in the documentation folder has been updated, so don't use that info for setting anything up yet. As kaijk mentioned, backup the custom_components/weatheralerts folder, copy over all of the files (including the translations folder) from the github custom-components/weatheralerts directory. The README.md has info on how to keep using the yaml package, if you are using that for dashboards and automations. Once you've got the new integration files installed, continue with the 'Restart Home Assistant' step in the upgrade section of the README.md. The README.md has info on how to keep using the yaml package, if you are using that for dashboards and automations. I don't recommend it, and I will include an example Vertical Stack Card code and a link to a persistent notification automation blueprint below if you want to stop using the yaml package. It will take a week or two to get a proper release done...I need to submit the icon/logo files to the HA Brands repository and add the necessary github actions to ensure this integration passes all of the HA and HACS repository tests, then I'll get final documentation done and get the new release out. For persistent notifications (which was previously included in the yaml package), first install the updated integration files and make sure the integration is properly running and configured. Then, in the Home Assistant UI, go to Settings > Automations & Scenes > Blueprints > Import Blueprint. On the Import A Blueprint popup, paste this URL to import the persistent notifications blueprint: Once installed, you can click the 3 vertical dots for the newly added weatheralerts blueprint and click Create Automation. Select your weatheralerts sensor from the drop down and click Save. This automation should give you a notification that has full alert text for any alerts less than 30 minutes old. If a new alert comes in and there are any alerts older than 30 minutes, the newer alert(s) display as full text alert and the older alerts switch from full alert text to just the alert event title. Once an alert has been removed from the NWS feed for 30 minutes, they should automatically clear from the notifications. For the dashboard, I have a Vertical Stack Card example that can be used as-is or modded as desired. Go to the HA UI, pick the screen on your dashboard where you want weather alerts, click the 'Edit Dashboard' icon in the upper right corner of your HA interface, and then click the Add Card button at the lower right corner of your HA interface. Choose the Vertical Stack Card, click the 'Show Code Editor' link in the bottom left corner of the Vertical Stack Card editor popup, delete any code that is already there, and paste in this code: (Github mangled the card code... see the attached file) In this vertical stack card code example, find the {% set sensor = states[''] %} line, add your sensor by typing sensor.weatheralerts inside the single quote marks on that line. Once you start typing, the UI will pop up a sensor list that will narrow down as you type. Find your new weatheralerts sensor and select it or keep typing out the full sensor name. If you run into any difficulties, don't hesitate to post here. |
Beta Was this translation helpful? Give feedback.
-
|
Followed @kaijk instructions and add the @jlverhagen vertical stack card and the alert we current have is displayed. Just need to get the alert notification changed. Thanks for the new integration. |
Beta Was this translation helpful? Give feedback.
-
|
I've got this new code working, and I have made a couple of tweaks to the blueprint that sends me the notification also as an email. Convert the blueprint to a straight-up automation as follows (note that I have kelp this all in a #blueprint:
# name: WeatherAlerts – Persistent Notification and Cleanup
# description: >
# Persistent notification for Weather Alerts from a weatheralerts integration
# sensor, plus automatic cleanup when no active alerts remain for 30 minutes.
# New alerts and alerts less than 30 minutes old will display as a full alert
# message in the psrsistent notification. Alerts older than 30 minutes will
# only display as a short alert event title in the persistent notification.
# domain: automation
# input:
# sensor:
# name: WeatherAlerts Sensor
# description: The weatheralerts sensor to monitor
# selector:
# entity:
# domain: sensor
# integration: weatheralerts
#
automation:
- id: weatheralerts_notifications
alias: Weatheralerts Notifications
initial_state: trueand then replace the two - platform: state
entity_id: sensor.weatheralerts_<my zone information> #!input sensor
attribute: alert_tracking
variables:
sensor: sensor.weatheralerts_<my zone information> #!input sensorThen, I put the message into a variable: so I can use it for multiple notifications: # - service: persistent_notification.create
# data:
# notification_id: "{{ notif_id }}"
# title: "Weather Alerts for {{ zone_name }}"
# message: |
- variables:
alert_msg: |
{% set new_ids = alert_ids | selectattr('status','eq','new') | map(attribute='id') | list %}
etc.The automation uses the message variable in both the persistent notification, and as an html message sent via an email notification: - service: persistent_notification.create
data:
notification_id: "{{ notif_id }}"
title: "Weather Alerts for {{ zone_name }}"
message: "{{ alert_msg }}"
- service: notify.yahoo_mail_notifier
data:
title: "Weather Alerts for {{ zone_name }}"
message: "" # "Message" is a required key, but any included text does not display in the email message
data:
html: >
{{ alert_msg }}Now I get both a notification in HA and the alert via email Here is how my smtp email notifier is configured in configuration.yaml (or in the package): notify:
- name: "Yahoo Mail Notifier"
sender_name: "Home Assistant"
platform: smtp
server: "smtp.mail.yahoo.com"
port: 465
timeout: 25
encryption: tls
sender: !secret yahoo_sender
username: !secret yahoo_username
password: !secret yahoo_password
recipient:
- !secret yahoo_recipient_1 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello @jlverhagen this is a very useful add-on to HA.
I see where the sensor.py code was updated 5 months ago but a new release was never created. With the alerts.weather.gov site no longer available the new code seems to have removed that reference. Is there a plan to create a new release?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions