-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle UTF-8 in names configured in Wiser Hub #396
Comments
Can you provide a diagnostics download from the integration. I didn't think we were doing anything to change this so need to have a look what your hub is providing. Thanks |
In the diagnostics file names are stripped from national characters as well: |
OK, I know what the issue is here. We have some code to fix an invalid char sometimes coming from the hub which is stripping all non-ASCII chars. Will need to look at another way to do this. |
As far as I remember stray characters appeared only at the end of the output, not in field names. You need to UTF-8 checks as ones available in Rust 😉 |
No they appeared in the network parameters too. Its OK, I can fix. If you want to give it a go before release, you can amend the aiowiserheatapi library in your HA setup and change the following: In rest_controller.py line 125 where is says: response = re.sub(rb"[^\x20-\x7F]+", b"", content) Change to: response = content.decode("utf-8", "ignore").encode("utf-8") This will be in next release but that maybe a week or 2 as working on support for v2 hub and want to push all this at same time. |
I'll check this tomorrow as I don't have time today to dig through the installation. Thanks for quick response. Do I need to remove the integration and set it up again for this to pick up right names, or is this going to be synchronised as a change in the model? |
It will likely create new room devices and entities with the 'new' names. As such, you can either delete integration and re-add or delete the unavailable entities and old devices once new ones are created. |
OK, managed to go through this. Seem to be working. I know it's little off topic, but there's no Discussion section in this repo: where the term |
It stands for long term statistics. They were created like this some time ago when LTSs were new. The names dont really make sense now but dont want to change them as people will have a lot of history stored for them. So you used to work on the Wiser product? |
This was fixed in v3.4.0. Closing issue. Thanks for raising. |
I have my rooms in the Wiser App configured with Polish national characters, like "Łazienka" (Bathroom), "Przedpokój" (Landing), "Łazienka Podłoga" (Bathroom Floor) and "Laury Pokój" (Laura's Room), which are perfectly fine displayed in the App.
The Home Assistant integration ignores these characters, showing limp names ("Przedpokj", "azienka", "azienka podoga", etc.):
Can you please fix deserialisation of these names to take national characters into account?
The text was updated successfully, but these errors were encountered: