Home Assistant Android version: beta-432-cce1608-full
Android version: 10
Phone model: Motorola Moto One Vision
Home Assistant version: 0.116.2
Last working Home Assistant release (if known):
Description of problem:
The event named mobile_app_notification_dismissed (33 characters) is 1 character too long for the event_type column in the events table which is a varchar(32) field.
So the event is sent and runs fine, but is not saved in the database.
Traceback (if applicable):
Error saving events: (MySQLdb._exceptions.DataError) (1406, "Data too long for column 'event_type' at row 1") [SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id, context_parent_id) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('mobile_app_notification_dismissed', '{"action_1_title": "xxx", "channel": "xxx", "action_2_title": "xxx", "action_2_key": "xxx", "tag": "xxx", "title": "xxx", "message": "xxx", "action_1_key": "xxx", "device_id": "xxx"}', 'REMOTE', datetime.datetime(2020, 10, 13, 3, 11, 23, 122501, tzinfo=<UTC>), datetime.datetime(2020, 10, 13, 3, 11, 24, 12342, tzinfo=<UTC>), 'xxx', 'xxx', None)] (Background on this error at: http://sqlalche.me/e/13/9h9h)
Screenshot of problem:
Additional information:
Related to #1012
This is not reproducible when the stock recorder is used. Seems to be specific to mysql. I also don't see any mention of this limit in the dev docs.
Found the limit in dev docs, working on a fix now.
https://data.home-assistant.io/docs/events/#database-table
I didn't catch this because the stock recorder just didn't complain so I assume MySQL is just more strict with errors