Exactly.
correct, and every extra piece of data that is added makes it more likely that you will reach that limit quicker for less alerts so you are actually more likely to miss something important.
I’ve already added many more attributes than were there originally per other users requests. But there has to be a line somewhere.
It’s not held in the state. all of those extra data points are held in the attributes.
if they were in the states then it would really be a problem because states are limited a total of 255 characters.
I truly abhor breaking changes.
I struggled with the last breaking change even tho I knew it would end up much better afterward.
And even tho I explained all of that a couple of weeks before the release and provided updated code to deal with it in the provided package people still got pretty upset by it. To the point that someone actually tried to get the integration banned from HACS.
Also adding a service would make it more complicated to get the data than it is right now. just look at the hoops we have to jump thru now to get the weather forecasts that was easily provided by attributes before.
and again that’s assuming I could even figure out how to code that.
So since the integration works pretty darn good the way it is right now (with some known limitations for the edge cases) I really don’t think changing it like that is going to happen.
If people really want all the attributes (called “features” & “properties” in the API return data) then there is already a way for you to get everything.
just use a REST sensor calling the same API endpoint that the integration does and you will get everything completely unfiltered. Then you can parse that however you want to get any data you want out of it.
but you will still run up against the memory limit if a lot of alerts come in at once since it still puts everything into the attributes.
That’s actually the way I originally got the information before the integration was created.
here is the REST sensor if you want to play around with it (make sure you put in your own zone, etc, data):
sensor:
- platform: rest
resource: https://api.weather.gov/alerts/active?zone=INZ009,INC033
name: NWS Alert Event Raw
value_template: >
{% if value_json.features[0] is defined %}
{{ value_json['features'][0]['properties'].event }}
{% else %}
None
{% endif %}
json_attributes:
- features
headers:
User-Agent: Homeassistant
Accept: application/geo+json
scan_interval: 60