jaroschek / home-assistant-myuplink

Custom Home Assistant integration for devices and sensors in myUplink account.
43 stars 10 forks source link

Not an Issues #8

Open jorgenseike opened 1 year ago

jorgenseike commented 1 year ago

Hi! Thanks for the awesome Myuplink integration. Do you have any frontend examples? Cards for the dashboards fks, i have no idea what i am looking at on the raw data.

Thanks again! Awesome work :) Finally someone has made a proper hacs for it :)

siggeb commented 8 months ago

@jorgenseike its been a while since you added the comment above. I am in the same situation as you were then. Did you come up with some good dashboarding? In particular, I am first looking for the words that correspond to the numeric parameter for example for the statuses.

jaroschek commented 8 months ago

Hello @siggeb,

the naming of numeric parameter options is currently solved through translations. Therefore the following files should be edited/extended:

The known problem with that solution is, that we can not know every possible parameter id and value id and its translation, that can be provided through the api. So we can only extend the translations if we get the information for new parameters with options.

Everybody is free to help/extend the projekt and translations through a PR.

Thanks.

jaroschek commented 8 months ago

Hello @siggeb,

as I wrote the above comment I thought about why I initially used the numeric values. Mainly because a numeric value is universal and can be translated to any text representation.

But as the myUplink API is used by many manufacturers providing many different parameters with individual options, it will be challenging to provide translations for every numeric parameter option possible.

So I implemented a "switched" initialization of the enum entities to use the text values instead: https://github.com/jaroschek/home-assistant-myuplink/pull/58

Every option will now be represented by its text, to be initially readable. And these text values can be translated too.

But there are downsides to this solution too. For example some parameters have enum options with redundant text values for different numeric values. I can only blame the manufacturers (in my case Nibe) for this.

@7RST1 How do you think about such a solution? You already worked with the text values in the select entity you added.

siggeb commented 8 months ago

I am actually not really following here exactly what you meant first, and what the change will mean for me. Just looking at one of the values I have that is called "General status", in my timeline I have mostly 4 and then sometimes 5. One 12. But looking at the strongs and translations, I cannot really map them to any of them either. Would the change mean you take some more strings from the API maybe?

jaroschek commented 8 months ago

Oh sorry for the confusion.

But yes, the solution would just be to use the text values of the options in the First hand. So everybody could See the default english text representation of the current numeric values.

The currently available translations come from decices I and @7RST1 knew during implementation. Every other devices and entities we don't know. So somebody else who knows these options from their api responses could provide additional translations.

But, if we change to the text values, this would be not so urgend, as everybody would see the english text values in the first place.

siggeb commented 8 months ago

We are talking about these right? I mean, whenI first got them into HA, it wasnt very easy, but after getting them into that history explorer I can kind of guess what they are. But yes, if they would be the actual names of the statuses, I think it would be better. If you merge that PR, do I need to do anything to adopt the change in my current device?

I can also edit those files, but then I would need some help on how to know what the sensor numbers are that I should use in the strings file. I dont see any corresponding numbers anywhere in my device. image

jaroschek commented 8 months ago

I have now merged the PR. You can just upgrade the integration through HACS and reload Home Assistant.

Unfortunately the historic numeric states for the entities will not be changed. But starting with the update to version 1.1.0 the states will use the strings from the API.

siggeb commented 8 months ago

I can confirm I now get some strings instead =) not very consistent, but does the trick =) image

siggeb commented 8 months ago

Ok, so with the new strings, I have been observing at times that I am getting the digits again. IN the first screenshot you can see some Defrost and On in the second row, but also sometimes number 3. The funny thing is that 3 should be the equivalent of On. So how come it comes up every now and then?

image image