Closed kwbeck closed 10 months ago
If it was available in the API a switch would have been automatically created for it.;
@ekutner Understood, and that's definitely been the case for every other program and option, so I was very confused that this option was not being created as a switch, but WAS being created as a binary sensor.
Since I could see it in the debug file (included at the end) I thought perhaps it was because this option was not in the translation files. So I added the option to my local en.json file, but of course, that didn't fix it.
Then, having no experience with APIs, but as a sanity check for myself, I looked at the output of the API for my dishwasher, and saw that all of the available programs and options, including Dishcare.Dishwasher.Option.ZeoliteDry
were listed, but ONLY under api/homeappliances/{haId}/programs/selected
, NOT api/homeappliances/{haId}/programs/available/{programkey}
. (screenshots of "Auto2" program below)
I confirmed that this is the case for all 3 of the programs supported by my dishwasher which also support the "Zeolite Dry" option. (Intensiv70, Auto2, and Eco50, aka, Heavy, Auto, and Normal on my machine)
Therefore, I'm concluding the problem is in the API.
This also fits with my (very) limited understanding of how the integration handles switch and binary sensor creation, i.e. it looks like the integration checks selected_program
and selected_program.options
(as well as the active_
equivalents) for binary sensors, but available.programs
for switches. Which, given the API behavior, means it would create the ZeoliteDry binary sensor, but not the switch. Am I correct in this understanding?
Long winded way of saying that you're correct. :) i.e. If it were supported (properly) in the API, the switch would have been automatically created. Unfortunately, it's only half/inconsistently implemented in the API....
Thoughts? I assume this means the API needs to be fixed?
If you agree with my findings, I'll be glad to submit feedback through the Home Connect Developer site.
( I don't know if "Zeolite Dry" is a relatively new option, since I just got the dishwasher, but FYI, it's not listed in the documentation either - https://api-docs.home-connect.com/programs-and-options/#dishwasher)
In any case, thank you for the fabulous work on the integration. Much appreciated.
Debug log entry for Zeolite Dry
},
"Dishcare.Dishwasher.Option.ZeoliteDry": {
"key": "Dishcare.Dishwasher.Option.ZeoliteDry",
"value": false,
"type": null,
"name": null,
"unit": null,
"displayvalue": null,
"min": null,
"max": null,
"stepsize": null,
"allowedvalues": null,
"execution": null,
"liveupdate": null,
"access": null
},
For someone who has no experience with APIs you have a pretty good understanding of how it works. The thing is that options under the "selected" or "active" programs are not settable in the API. As far as I can tell they are there only for informational purposes but trying to change their value always fails. That's the reason that only "available" options are creating settable entities in HA. Bottom line is that it is indeed a limitation of the API.
Much appreciated. I'm was a motivated learner in this case, but it did take me a while to figure all of that out. Good experience, though.
I completely understand what you are saying. If it's not in "available", it's not settable, and hence a limitation. Well and succinctly put....
But my next (rhetorical) questions, which didn't occur to me until I read your reply are:
Is it a limitation because the designers meant it to be (for some reason)?
Or, is it a limitation because it is broken and they forgot to put that option in the "available" section?
I suspect you (or anyone not working for Home Connect) can't answer that, so I'll submit it to them as feedback/a bug report and see if I get an answer. Will report back in this thread if I do.
Thank you again.
I really don't know but there are many cases of options that are only available for reading under the selected/active programs and not under the available programs. My assumption has always been that it is by design but I never asked them and will be happy to find out it was just a bug. Good luck.
Good to know. Thank you again. I've submitted the question through the Home Connect developer's site, and will let you know if I hear back from them.
I got a reply. They said:
"Dishcare.Dishwasher.Option.ZeoliteDry option is not supported currently, but we’re going to add it in the upcoming 1-1.5 months. If you’d like to see something else supported feel free to let me know and we’ll review if it’s possible (not everything is)."
Good news indeed. Thanks again for the help.
FYI, looks like they have finally added this to the API, and the switch is showing up (and working).
Describe the bug
The "Zeolite Dry" option/switch for my Dishwasher is not available in the integration, although for some reason, the binary sensor does appear.
(Screenshot attached. FYI, friendly name changed to "Crystal Dry" since that it what that option is actually called on my Dishwasher.)
Version of the custom_component
0.6.5
Configuration
Debug log