-
Notifications
You must be signed in to change notification settings - Fork 57
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
Sensors or Select boxes are shoing raw enum values looking something like BSH.Common.Program.XXX #26
Comments
Dishwasher: BSH.Common.EnumType.PowerState.Off Washing Machine BSH.Common.EnumType.OperationState.Ready And for Same for |
@emufan Where exactly do you see those values and and in what language? They are already translated and should appear in their friendly names in English and German. You can see the translation files here: https://github.com/ekutner/home-connect-hass/tree/master/custom_components/home_connect_alt/translations If you are using a different language you are welcome to contribute a translation to that language. |
Seeing the same issue here as emufan on a Washing Machine and using Home Assistant in English. BSH.Common.EnumType.OperationState.Ready If I add "language: en-GB" to configuration.yaml the values appear correctly. |
I see them as states in developer tools. And I see them in all histories of the listed entities, which is not really usefull. So, somewhere/somehow the short-translation is used, sometimes not in this cases. Language in yaml is not set to anything. If this is a bug, you can of course split and move it to a sperated issue. |
@emufan As I noted. They are in the developer tools by design. These are the values documented in the Home Connect API documentation so they are also used for scripting the integration. Scripts should not depend of translated strings and these values will work regardless of your selected language. @BeerBOFH If you see these values in the same place as @emufan then see the above explanation, otherwise specify where you do see them. |
I think you are wrong. As this was/is not the case for other entities and after putting now de-DE in yaml, most of them disappeared as well. Afterwards not only the status is shown correctly in entity, it is shown in developer tools and history correctly as well. Not for all items but for most of them. So this cannot be by design, but different assignments in the integration. Here I'm not the expert, if you hand over different variables for log, recorder and state or whatever is happening compared to the entities which were correct directly from the beginning and those, which are now right with de-DE and which are still not correct. I will start from scratch and will make a table next days, if I have more time, and provide the findings. Perhaps you can then easier find the different behavior in your codings. |
I should have been more specific, I'm talking about "select" entities. Sensors are translated according to the configured language. |
O.k. could be the case. I will double-check. |
I've updated the README file with a better explanation of how it works.
|
O.k. Much better. 😉 I have added three missing EnumTypes per PR. But I still get not, why it is possible for alarm_control_panel, cover, media-player, weather, etc. entities to display is "correctly" in history. Besides the select boxes, but they of course differ from the other entities. And what is with the yellow and orange items in the third column. See questions above. |
I'm not sure what is your question re. the red and yellow. |
Yes, that was what I wanted to suggest.
First the one is Off (and in other case most probably On) and all others are off/on in lowercase. And for me it seems that these are booleans, but in these cases not created as boolean-sensors. But perhaps you drive the type from the API and than it is as it is. |
The type is derived automatically from the API. You can tell the type of sensor by looking at the entity ID which starts either with "binary_sensor", for boolean sensors, or with "sensor", for all other types. |
Hi, If I add sensor_value_translation: server to the config, i get to see this: Invalid config for [home_connect_alt]: [sensor_value_translation] is an invalid option for [home_connect_alt]. Check: home_connect_alt->home_connect_alt->sensor_value_translation. (See /config/configuration.yaml, line 31). Someone have an idea about this? |
same for me |
I see two sensors (BHS.Common.*) not translated, but they are in the select.en.json and sensor.en.json translation files. I'm using 0.5.0-b2 and I have What am I missing? |
@alexdelprete it's a bit confusing but the translation file is not selected by what you configure in the integration configuration but by the language you have configured for the Home Assistant. Is your HA language English? As a side note, I noticed that the translation you are getting from the server for the Auto2 program is not just "Auto 2" but "Auto 45-65C" so would be great if you can check what are the correct translations for Auto1 and Auto3 as well. |
IIRC, HA language is based on the user profile. I can't find a "default language" setting.
so I switch the program on the dishwasher and report back what's being sent by the server? |
I was referring to the language set in the profile. |
It's english. |
|
@ekutner I upgraded to b7 and switched to local again: the problem is solved, didn't do anything else. I guess you fixed something. I noticed an issue with OperationState, will open a separate issue. Thanks. |
Nothing in that version would have solved such a problem but as long as it's gone I'm going to close this issue |
@ChristophCaina It should work both ways, I actually never noticed any difference between using only the language code or language-locale. |
BOSCH OVEN |
I saw that but I try to keep the list properly sorted, your PR adds lines which are not sorted. It's not a big deal but I didn't have time to deal with reordering the lines so I didn't merge the PR yet. |
Oh okey. @ekutner : Off before On - or should I move both lines somewhere else? If you could give a short update maybe as a comment on the PR, I can do the changes you like :) |
hi @von-Chaps,
hi @DjBac
|
Ecolysis is just displayed as "Cleaning function", it makes no mention in the app of any "eco" aspect. Many thanks. |
As I understand this, you've taken the design decision to use the full string representation of the various enum types as the state value for the corresponding state entities, and rely on home assistant's translation feature to map from that home connect api defined string to something readable. This isn't an approach I've seen other integrations use, and I do see that on the surface it's a nice solution, in practice it seems to be more trouble than it's worth. The fact that not all parts of HA use the translation system makes a lot of stuff really hard to use. As you acknowledge in the first post, it's not supported in History, which is really unhelpful. It makes creating automations harder, because, for example if you want to do something when the appliance power is turned on, you need to specify a non friendly, overly long string "BSH.Common.EnumType.PowerState.On" instead of just "on", which is typical of all the other integrations I'm familiar with, including the "official" home connect integration. Are you really wedded to this approach? There's a lot to like about this integration - dynamically only creating relevant entities etc - but the usability regressions compared to the "official" one make it far from clear that this is the best one to use. |
@slippyr4 That's a good summary and that approach is not going to change for what I believe are good reasons. You are more than welcome to use the other integration. |
BSH.Common.EnumType.AmbientLightColor.Color1 Blue, I guess? |
Do we have to add the Translation to sensors.json or select..json or both? |
Both |
Okay the both diff very much in German, |
Hi, Second question : I have forked the projet to create the fr language file. Sould I translate all the json or only the missing translation ? |
@seb2020 Not sure how it can be translated, unless you're using sensor_value_translation: server It will be great if you do the French translation. Make sure you start with the English file because it is the most complete. Note that the sensor translation is a superset of the select translation, so you don't have to do it twice. Ideally you should translate the whole file so it works as expected for other users. |
Just installed Home Connect Alt through HACS and had issues with translation, tried to switch HA/User language to Swedish, English and British English. Restarted etc, still strange status. Read this post and some others, eventually added to yaml: Now working fine. There is something fishy going on. I will leave it as it is for now. Making this reply to give feedback and help others. Running: Home Connect Alt 0.6.0 |
I will start with the sensor file. Is this possible to test in live my translation ? If I put the file in my HA, item will be renamed with the translation ? |
If you place the files in the translations folder and restart HA it should work. Note that you should also translate en.json |
Should I set the |
@seb2020 you should set the HA UI language to FR, not in the config file |
After upgrading to 0.6.1 everything related to the translations works much better. 😊 The value I currently see is Couldn't find anything with |
My dishwasher is showing some strange values:
|
Missing translation on Siemens Washer program: |
@EddyK69 feel free to create a PR with the translation |
Hi all new to scrips and new coffee maker I have a untranslated state for coffee maker. Can I ask when using Call a service 'Home Connect Alt: Apply setting' on can anyone tell me what the format for both the 'Setting key' and setting value wold be when my entity is. |
With server translation now supporting the select entities it is finally time to close this issue. |
Not so fast! I have updated to version 1.0.0 and believe I I have sensor value translation issues with my Inductive Siemens Cooker:
None of the above two sensors accept my attempt to rename them in the UI. |
These values are used by the Home connect API and exposed by the integration for scripting and event publishing. The integration is using these values so they match the Home Connect API documentation.
Since these enum values are not very user friendly the integration relies on the Home Assistant translation capabilities to translate them into friendly names in supported languages. All the documented values have already been translated however there seem to be some undocumented values that can only be translated when users report them because until that happens there is no way to know they even exist. In the comments to this issue you can report on untranslated values to be added to the integration.
Please do NOT share screenshots, only text values of these enum values will be considered.
Important Note
The Home Assistant translation doesn't seem work for the sensor history display, so please don't report on their existence in there.
The text was updated successfully, but these errors were encountered: