ekutner / home-connect-hass

Alternative (and improved) Home Connect integration for Home Assistant
MIT License
494 stars 53 forks source link

How to add entities to HACSS integration (microwave is missing) #289

Closed Allinijhof closed 6 months ago

Allinijhof commented 7 months ago

Hi Ekutner,

Thanks for building the HACSS integration, it is very useful for my dishwasher, steam oven and combi oven. Hence unfortunately the microwave (part of my Siemens combi oven) is not available (no microwave entities available).

How can I enable these missing entities in the HACSS integration so that I am able to control my microwave through home assistant?

Regards,

Allard

In the attached screenshot you will find the Home connect app, the "Verwarmingswijze" = regular oven heating has been enable in the HACSS integration however "Magnetron" = microwave has been missing.

Screenshot_2023-11-26-12-47-35-09_9f7c1d68ad2a6fad3b248f3ec2a58ba4

ekutner commented 7 months ago

Hello, in general all entities are created automatically if they are provided by the API. If you don't see these entities then most likely they are not available in the API. If you want me to take a deeper look you need to follow the issue submission instructions and also add log_mode: 7 to the home_connect_alt section of your configuration.yaml file.

TomD011099 commented 7 months ago

I'm having similar issues and did some digging.

If you call the API for the available programs of a combi-steam or combi-mircowave device it will only give the Cooking.Oven.Program.HeatingMode.XXX options. (Example response)

The strange thing is, when you select or run the steam or microwave functions, the API accurately represents the running program (Cooking.Oven.Program.SteamModes.XXX and Cooking.Oven.Program.MicroWave.XXX).

I attached some examples (the microwave is from a different device, but has a similar /programs response)

active-steam.json selected-steam.json active-microwave.json

Starting a steam or microwave program using the API results in an SDK.Error.UnsupportedProgram error for me.

I'd still love to be able to see whether or not the steam program ran in order to send a message to clean the oven.

ekutner commented 7 months ago

@TomD011099 Sorry but I don't really follow what you're trying to say. Obviously, the integration can't support what is not available through the API. If the API does show the correct active or selected program then the integration will show that in the relevant sensors regardless of its availability as a settable program.

TomD011099 commented 7 months ago

@ekutner The problem is that it isn't a settable program, but it is readable.

You aren't able to set or read it (it also doesn't show up in the list of available programs where I'm guessing you get the list of programs for each device), but you can see it when the program is actually running on the device.

Eg: A combi microwave oven will only show the oven programs in the programs endpoint and it will only allow these programs to be started remotely. However, when you start a microwave program on the device itself and then check the running program through the API, it will accurately represent the running program with a key that isn't in the available program list. The issue here is that the plugin is only able to read the oven programs (even though the microwave program is sent by the API). This results in an unknown value for the program in HA where I'd love to have the Cooking.Oven.Program.MicroWave.XXX which is returned by the API

ekutner commented 7 months ago

The select box will not show the value if it's not one of the available programs but you should see the correct active program in the Active Program sensor.

TomD011099 commented 7 months ago

Aha, I was trying to use the 'Program selected' condition in my automation. The active program sensor does seem to show the correct value. Thanks very much for the help!