ekutner / home-connect-hass

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

Value selected_program and active_program reversed #184

Closed Rep-Hueman closed 1 year ago

Rep-Hueman commented 1 year ago

Describe the bug

The following Sensors get the wrong value on my coffee machine! Device info TI9573X9RW Siemens

''The selected program is the program which is currently shown on the display of the home appliance. This program can then be manually adjusted or started on the home appliance itself."

When I do that active_program is populated in Home assistand! When I select a program in the Home connect alt intergration the sensor active_program is changed in HA and online de SelectedProgram is changed.

I checked with online with the API client - Physical home appliances

Version of the custom_component

0.6.0

Schermafbeelding 2023-03-08 165236
https://api.home-connect.com/api/homeappliances/SIEMENS-TI9573X9RW-xxxxxxxx/programs/active

{
  "error": {
    "description": "There is no program active",
    "key": "SDK.Error.NoProgramActive"
  }
}

https://api.home-connect.com/api/homeappliances/SIEMENS-TI9573X9RW-xxxxxxx/programs/selected

{
  "data": {
    "key": "ConsumerProducts.CoffeeMaker.Program.Beverage.Coffee",
    "options": [
      {
        "key": "ConsumerProducts.CoffeeMaker.Option.CoffeeTemperature",
        "value": "ConsumerProducts.CoffeeMaker.EnumType.CoffeeTemperature.94C",
        "name": "Temperatuur",
        "displayvalue": "94°C"
      },
      {
        "key": "ConsumerProducts.CoffeeMaker.Option.BeanAmount",
        "value": "ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.StrongPlus",
        "name": "Sterkte",
        "displayvalue": "Sterk +"
      },
      {
        "key": "ConsumerProducts.CoffeeMaker.Option.FillQuantity",
        "value": 140,
        "unit": "ml",
        "name": "Hoeveelheid"
      },
      {
        "key": "ConsumerProducts.CoffeeMaker.Option.MultipleBeverages",
        "value": false,
        "name": "Dubbele uitgifte"
      },
      {
        "key": "ConsumerProducts.CoffeeMaker.Option.FlowRate",
        "value": "ConsumerProducts.CoffeeMaker.EnumType.FlowRate.Normal",
        "name": "doorstroomsnelheid",
        "displayvalue": "normaal"
      },
      {
        "key": "ConsumerProducts.CoffeeMaker.Option.BeanContainerSelection",
        "value": "ConsumerProducts.CoffeeMaker.EnumType.BeanContainerSelection.Left",
        "name": "Bonenreservoir",
        "displayvalue": "standaard bonenreservoir links"
      }
    ],
    "name": "Caffè crema"
  }
}

Remark

I have been working with Home connect in combination with Home assistant for a few years and have also made my own integration of various other integrations.

I have 4 devices to test.

Coffee machine (Siemens TI9573X9RW), Washing machine, (Bosch WAVH8M90NL), Steam oven (Siemens CS856GNB7), Combi oven (Siemens CM876G0B6)

Now switching to very nicely made Home connect alt .. *****

ekutner commented 1 year ago

Thanks. Version 0.6.0-b2 should fix this

Rep-Hueman commented 1 year ago

Just tested on the coffee machine and the washing machine.

Works perfectly now!

testing the combi oven and steam oven tonight!