question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Last notification sensor not saving in HA due to emojis

See original GitHub issue

Home Assistant Android version: 3.0.2-full

Android version: 10

Phone model: Moto One Vision

Home Assistant version: 0.118.0

Last working Home Assistant release (if known):

Description of problem: I just received a push notification from a sudoku game and it seems like emojis in the notification message are added to the state which is not supported by the HA database schema.

Traceback (if applicable):

Error in database connectivity during commit: (MySQLdb._exceptions.OperationalError) 
(1366, "Incorrect string value: '\\xF0\\x9F\\x8E\\x89' for column `hassio`.`states`.`state` at row 1") 
[SQL: INSERT INTO states (domain, entity_id, state, attributes, event_id, last_changed, last_updated, created, old_state_id) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)] 
[parameters: ('sensor', 'sensor.visionist_last_notification', 'Be the first one in the world to solve today’s new puzzle🎉', '{"android.appInfo": "ApplicationInfo{de8a77b sudoku.puzzle.free.game.brain}", "android.infoText": "null", "android.largeIcon": "Icon(typ=BITMAP size= ... (627 characters truncated) ... ficationCompat$BigPictureStyle", "package": "sudoku.puzzle.free.game.brain", "friendly_name": "visionist Last Notification", "icon": "mdi:bell-ring"}', 218697670, datetime.datetime(2020, 11, 19, 3, 22, 11, 674862, tzinfo=datetime.timezone.utc), datetime.datetime(2020, 11, 19, 3, 22, 11, 674862, tzinfo=datetime.timezone.utc), datetime.datetime(2020, 11, 19, 3, 22, 11, 674862, tzinfo=datetime.timezone.utc), 208339691)] 
(Background on this error at: http://sqlalche.me/e/13/e3q8). (retrying in 3 seconds)

Screenshot of problem:

Additional information:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jesserockzcommented, Dec 7, 2020

Thanks, I have been way too busy to try this out over the past few weeks. I ended up disabling the sensor but will give it another shot when I get a chance.

0reactions
dshokouhicommented, Dec 7, 2020

The recorder docs have now been updated and a new fix will be in the next HA core release. Going to close this now. You may need to recreate the DB for the fix to get applied on existing installs:

https://discord.com/channels/330944238910963714/427516175237382144/785627526512508958

If you still have an issue after updating the recorder statement and HA core then we can revisit although it may ultimately be a core issue.

This may also help: https://github.com/home-assistant/core/issues/44037#issuecomment-740216825

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recorder error when an emoji is present in data #44037
Home Assistant Core release with the issue: 1.0b2; Last working Home Assistant ... Last notification sensor not saving in HA due to emojis...
Read more >
emojis not not showing up in notification shade after factory ...
I factory reset my OP6 after android 10 upgrade, and now suddenly all the emojis are showing as unknown characters in my notification...
Read more >
Sensors | Home Assistant Companion Docs
In App Configuration, open the server's settings and change Sensors Sent setting under Privacy. Options available: All sends all enabled  ...
Read more >
About iOS 15 Updates - Apple Support (IN)
Notifications have been redesigned and a new notification summary ... This update also includes new emoji, a new voice option for Siri, ...
Read more >
No recent emoji [Not a SwiftKey bug]
The recently used emoji section is blank / they do not save. ... SwiftKey's recent emojis are not accessed by a button.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found