I tried the sensor as posted by @finity, and it broke my recorder. Seems having a hurricane go by makes the list of alerts too long to stick into the database, and having an excessively long SQL query actually borks the recorder until the hass service is restarted. Icky.
2018-10-10 10:36:40 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.DataError) (1406, "Data too long for column 'event_data' at row 1") [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (%s, %s, %s, %s, %s, %s, %s)'] [parameters: ('state_changed', '{"entity_id": "sensor.nws_alert_event", "new_state": {"last_changed": "2018-10-10T15:36:40.468924+00:00", "entity_id": "sensor.nws_alert_event", "con ... (68707 characters truncated) ... l; Santa Rosa Coastal; Okaloosa Coastal"}, "geometry": null, "type": "Feature"}], "friendly_name": "NWS Alert Event"}, "state": "Hurricane Warning"}}', 'LOCAL', datetime.datetime(2018, 10, 10, 15, 36, 40, 468997, tzinfo=<UTC>), datetime.datetime(2018, 10, 10, 15, 36, 40, 475520), 'aa244d704c424398a8fbf1959627dc03', None)] (Background on this error at: http://sqlalche.me/e/9h9h)
The family and the house are fine, we were just on the western edge of Michael’s path. Max winds around 35-40 knots. The worst damage was we had a trash can get blown over.
Anyways, how can we work around this? The recorder thing, not the trash can