Alerts from the US National Weather Service
Unless you have a good reason not to, you probably want to install this component via HACS(Home Assistant Community Store)
- Ensure that HACS is installed.
- Navigate to HACS -> Integrations
- Open the three-dot menu and select 'Custom Repositories'
- Put 'https://github.com/Snuffy2/nws_alerts_array' into the 'Repository' textbox.
- Select 'Integration' as the category
- Press 'Add'.
- Find the NWS Alerts Array integration in the HACS integration list and install it
- Add your configuration
- Restart Home Assistant.
You probably do not want to do this! Use the HACS method above unless you have a very good reason why you are installing manually
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder callednws_alerts_array
. - Download all the files from the
custom_components/nws_alerts_array/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Add your configuration
- Restart Home Assistant
Manually via an entry in your configuration.yaml file:
To create a sensor instance add the following configuration to your sensor definitions using the zone_id found above:
- platform: nws_alerts_array
zone_id: 'PAC049'
or enter comma separated values for multiple zones:
- platform: nws_alerts_array
zone_id: 'PAC049,WVC031'
After you restart Home Assistant then you should have a new sensor called "sensor.nws_alerts_array" in your system.
You can overide the sensor default name ("sensor.nws_alerts_array") to one of your choosing by setting the "name:" option:
- platform: nws_alerts_array
zone_id: 'INZ009,INC033'
name: My NWS Alerts Sensor
Using the configuration example above the sensor will then be called "sensor.my_nws_alerts_sensor"
- An updated version of the nws_alerts integration with the results in arrays for easier splitting of the alerts
- This integration retrieves updated weather alerts every minute from the US NWS API.
- The integration presents the number of currently active alerts as the state of the sensor and lists many alert details as a list in the attributes of the sensor.
- The sensor that is created is used in my "NWS Alerts Custom" package - https://github.com/Snuffy2/nws_alerts_array/blob/main/packages/nws_alerts_custom_package.yaml
- To enable detailed logging for this component, add the following to your configuration.yaml file
logger:
default: warn
logs:
custom_components.nws_alerts_array: debug
- Original Integration by @eracknaphobia: nws_custom_component
- Subsequent Integration by @finity69x2: nws_alerts