-
Notifications
You must be signed in to change notification settings - Fork 29
Feature Request: Extend Unit option into set_option_active service #129
Comments
Good point. Can you try with the latest commit on |
Thanks David, I grabbed the latest files and rebooted. First I tried the below, the format was defined by the "Fill Example Data" hyperlink via yaml mode
This produced the below error
I also tried the below, based on the format used for the start program service
This produced the error
Don't know if that helps, I have tried a load of different scenarios and formats but they all seem to provide similar log output and results. |
Can you please try with a raw API call or look at the API docs? I wouldn't know why SetPointTemperature should not be allowed to have value 180. |
Sorry still getting my head round the logs, didn't realise the log was a response from the API rather than HA. curl -X PUT "https://api.home-connect.com/api/homeappliances/{MYHAID}/programs/active/options/Cooking.Oven.Option.SetpointTemperature" -H "accept: application/vnd.bsh.sdk.v1+json" -H "Accept-Language: en-GB" -H "authorization: Bearer {AuthKey}" -H "Content-Type: application/vnd.bsh.sdk.v1+json" -d "{ "data": { "key": "Cooking.Oven.Option.SetpointTemperature", "value": 180, "unit": "°C" }}" I was able to get the RAW API working with the above call. I wonder if its because the difference is that the optionkey has to be specified in the request URL I don't think this is required when starting a new program. So the key need to be in both the data in the api call (with value and unit) but also in the URL? think this would explain the error from the API previously |
Thanks for checking, I think I have found the problem, but I don't have time to try it myself - would be great if you could check again with 008091f. |
No problem, happy to be the guinea pig. I have downloaded the latest files from github but I still get the same SDK error. I can't see anything in the change related to the URL. Are you sure the URL being called to Home Connect is https://api.home-connect.com/api/homeappliances/{MYHAID}/programs/active/options/**{OPTION_KEY}**" |
I think so, the relevant line is here: |
Sorry if this is a stupid question but what is that api.py you have linked to? I am using the one in this doesn't have any reference like that on |
@DavidMStraub if this wasn't python and I was going about troubleshooting in a different programming language I would output the API call to a log file or in this instance the HomeAssistant log. Is this possible to do in python in this instance. This should allow me to identify what is wrong with the API call produced from the integration and service call and might help pinpoint where in the code it is failing? |
Just thought I would post my findings in case anyone picks this up at some point as I certainly wont remember all this in a couple of weeks. I attempted to adjust the current cooking duration with the script syntax below service: home_connect_beta.set_option_active this resulted in the following error logs, I have obviscated the haid and bearerid.
I then performed the required request via Curl in linux with
Comparing purely the Curl URL and the equivalent URL output from the HomeAssistant debug log they look for the most part the same, clearly the issue is down to specific syntax it is hard to tell with all the escape characters. I might try changing the order of the headers in the curl command to make it clearer but the error tends to suggest the issue is with the data section of the call which I can't see an issue with. Any help or suggestions from anyone is appreciated otherwise hopefully this information helps someone |
I have been starting to use the Home Assistant HomeConnect integration with my oven thanks to the recent feature. However I am unable to get the set_option_active service to work. The below detail from the API tool suggests the feature is only available on ovens yet the example perimeters use a dryer. When trying to perform such tasks as change the temperature or duration of the active program I get the following error
Error handling message: extra keys not allowed @ data['unit']. Got None
https://apiclient.home-connect.com/?url=https%3A//apiclient.home-connect.com/hcsdk-production.yaml&client_id=YOUR_CLIENT_ID#/programs/set_active_program_options
I am using the following YAML
The text was updated successfully, but these errors were encountered: