jaroschek / home-assistant-myuplink

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

Unable to change Holiday Period #62

Closed oscfor closed 5 months ago

oscfor commented 5 months ago

When trying to change Holiday Period I get the reply:

[548006368832] Sensor sensor.ctc_ecozenith_i255_general_mixing_valve_delay provides state value '180min', which is not in the list of options provided

To me it seems like it is sending other parameters as well to the API, which are not related to Holiday Period. Maybe something not present on my configuration of heat pump (CTC Ecozenith i255)

jaroschek commented 5 months ago

Hello, could you support the debugging of this issue by providing a response with your parameter points?

Go to the MyUplink Swagger site, and authorize (top right). Find your device ID by querying ​/v2​/systems​/me, enter it when querying /v2/devices/{deviceId}/points.

The response of /v2/devices/{deviceId}/points should contain all available parameter. There I can try to identify a possible problem. Or at least I could try to reproduce the problem locally.

(I have no interest in system or device ids. These should stay private.)

oscfor commented 5 months ago

Of course! See attached file. response_1705328494249.json

jaroschek commented 5 months ago

Regarding your error message there is something wrong from the API:

  {
    "category": "General",
    "parameterId": "62004",
    "parameterName": "Mixing valve delay",
    "parameterUnit": "min",
    "writable": false,
    "timestamp": "2024-01-14T22:30:04+00:00",
    "value": 180,
    "strVal": "180min",
    "smartHomeCategories": [],
    "minValue": null,
    "maxValue": null,
    "stepValue": 1,
    "enumValues": [
      {
        "value": "241",
        "text": "Blocked",
        "icon": ""
      }
    ],
    "scaleValue": "1",
    "zoneId": null
  },

Although the enum values only allow 241 the entity value is set to 180 from the API already.

And by setting the value 180 to the entity (during initialization or update) it throws this error, because 180 is not a known enum option.

I would guess, that submitting the holiday delay itself does work, but is disturbed by this error.

oscfor commented 5 months ago

When I check thew heat pump display the value is 180.

image

jaroschek commented 5 months ago

I'm thinking of a solution. And it seems, that this parameter Mixing valve delay should not be an enum entity. It has a unit min and is not writable. This the given enum is negligible. It should just be time/duration sensor. So I will implement a hard wired type definition for this parameter. (There are already some known parameters with issues from other manufacturers/devices.)

jaroschek commented 5 months ago

I have made a small change to solve this error. As soon as the parameter has a unit it will not try to create an enum sensor entity. Thus any false/invalid enum option will be ignored.

https://github.com/jaroschek/home-assistant-myuplink/releases/tag/1.1.1

oscfor commented 5 months ago

Tried the 1.2.0a2 version. Works lika a charm!

jaroschek commented 5 months ago

Great! :)

But 1.2.0-x has a new feature providing an update entity to track firmware updates (just monitoring, as updating through API is not possible). This feature is not refined yet... i'm waiting for the next firmware update to arrive for testing and debugging.

The bugfix for your problem is also in 1.1.1 and 1.1.2.

oscfor commented 5 months ago

Works with 1.1.2 as well. Thanks a lot!