-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different icons for each alert type #50
Comments
That is the full set of alert types available. |
Now color the alerts with what NWS uses - https://www.weather.gov/help-map |
Thanks for sharing that! I'll incorporate the icon enhancement into the next update. I'll try to get an option for alert colors when I get around to refactoring the coding of the template. |
This is now integrated into the default yaml packages. I'm still working on a more comprehensive release and will integrate this feature directly in the sensor python code to eliminate the need for all of the extra yaml coding. |
I believe a color code attribute in a sensor could be used in the UI to color the alert text. If it works as I think it will, then I'll also add a color code attribute for each alert and include that directly in the sensor python code as well. |
I have updated the yaml packages with some fixes for the icon code to prevent template errors and a potential fix for the *_most_recent_active_alert sensors to ensure they get the correct icon. Please report any alert icon related errors or unexpected behavior here. |
FYI. When I copied your updated icon snippet to be included for my Android HA app notifications, I needed to replace hass:.... to mdi:...., otherwise it was just giving the general Home Assistant status bar icon. https://companion.home-assistant.io/docs/notifications/notifications-basic/#notification-status-bar-icon I also made that change to the 5 alert icon sections for being displayed on the Lovelace Cards. Both hass:... or mdi:... rendered the same. Eventually, I would love to get my Android notifications colors into the Lovelace cards text display alerts - lines 2985 - 3121 of my modified weatheralerts yaml file. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is your feature request related to a problem? Please describe.
Not a problem, an enhancement
Describe the solution you'd like
I have manually edited the weatheralerts_1.yaml file to provide distinct icons for the different alert types. Hope you'll be able to include these in the default code.
Under each of the alerts I replaced
icon_template: hass:alert-rhombus
with:
repeating the same code in each alert block, substituting the alert number.
Describe alternatives you've considered
I'm sure there's a more elegant way to do this.
The text was updated successfully, but these errors were encountered: