Closed lymanepp closed 2 years ago
State should just be a number. Count of alerts. can you see what the value is/was?
State should just be a number. Count of alerts. can you see what the value is/was?
I can't see what the invalid value was. But I can see that it has been set recently though.
Edit: here's partial output from your WeatherBitApiClient test client.
alert_count - 3
alerts - [AlertDescription(key='C3609', title='Freeze Watch issued January 28 at 11:51AM EST until January 30 at 9:00AM EST by NWS Tampa Bay Ruskin FL', en_description='', loc_description=' WHAT...Sub-freezing temperatures as low as 29 possible.', severity='Warning', effective_utc='2022-01-28T16:51:00', ends_utc='2022-01-30T14:00:00', expires_utc='2022-01-30T00:00:00', onset_utc='2022-01-30T06:00:00', uri='https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.685f3eeddb6bc64448acb225ee29d9f285e6b23a.002.1', city_name='Cape Coral', regions=['Polk', ' Hardee', ' Highlands', ' DeSoto', ' Coastal Pasco', ' Coastal Hillsborough', ' Inland Hillsborough', ' Inland Manatee', ' Inland Sarasota', ' Inland Charlotte', ' Inland Lee']), AlertDescription(key='C3609', title='High Surf Advisory issued January 28 at 4:07AM EST until January 30 at 1:00AM EST by NWS Tampa Bay Ruskin FL', en_description=' feet. For the High Rip Current Risk, dangerous rip currents', loc_description=' WHAT...For the High Surf Advisory, large breaking waves of 5 to', severity='Advisory', effective_utc='2022-01-28T09:07:00', ends_utc='2022-01-30T06:00:00', expires_utc='2022-01-30T12:00:00', onset_utc='2022-01-29T06:00:00', uri='https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.dca1abc4643ee36be344d5b0c1e76955cda079dd.001.1', city_name='Cape Coral', regions=['Pinellas', ' Coastal Manatee', ' Coastal Sarasota', ' Coastal Charlotte', ' Coastal Lee']), AlertDescription(key='C3609', title='Rip Current Statement issued January 28 at 4:07AM EST until January 30 at 7:00AM EST by NWS Tampa Bay Ruskin FL', en_description=' feet. For the High Rip Current Risk, dangerous rip currents', loc_description=' WHAT...For the High Surf Advisory, large breaking waves of 5 to', severity='Watch', effective_utc='2022-01-28T09:07:00', ends_utc='2022-01-30T12:00:00', expires_utc='2022-01-30T12:00:00', onset_utc='2022-01-29T06:00:00', uri='https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.dca1abc4643ee36be344d5b0c1e76955cda079dd.001.2', city_name='Cape Coral', regions=['Pinellas', ' Coastal Manatee', ' Coastal Sarasota', ' Coastal Charlotte', ' Coastal Lee'])]
Something goes wrong in the formatting of the Alert - damn they have many different formats🥴. I'll work on a fix.
Did you by any chance download the new sensor.py file? I just found that I introduced an error in that file, that is leading to this error.
Released 1.0.8, where this is fixed. Please check and close if you agree.
I've upgraded to 1.0.8 and don't see any errors in the log. Thanks for the fix!
I found the following error messages in my homeassistant.log file. Might need to truncate alerts to 255 chars.