Closed mdeweerd closed 2 years ago
@jes1417 (Created new issue as it was not really related to the #77)
My best guess: You are using MySql and the state_attributes table is using utf8mb3_general_ci encoding, while the provided data is using utf8mb4_unicode_ci encoding.
My recommendation is to change the encoding for the table to utf8mb4_unicode_ci .
This is because the friendly name has 🧰 in it and it is presented or detected as utf8mb4 encoding in the request. This highlights an encoding discrepency in the HA setup- when creating the MySql database it should have selected the proper endoding (...mb4) compatible with the requests that are made. IMHO this should be reported to HA (if the DB was created by HA), or elsewhere (if the database was created using a method/procedure not managed by HA core).
https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-conversion.html discusses some of that and shows example queries for converting a table/column - this may also be possible using a more userfriendly interface such as phpmyadmin.
Originally posted by @mdeweerd in https://github.com/mdeweerd/zha-toolkit/issues/77#issuecomment-1214796501
( Reported by @jes1417 ) Seeing this in my logs
Originally posted by @jes1417 in https://github.com/mdeweerd/zha-toolkit/issues/77#issuecomment-1214650494