jwillemsen / daikin_onecta

Home Assistant Integration for devices supported by the Daikin Onecta App
https://github.com/jwillemsen/daikin_onecta
GNU General Public License v3.0
295 stars 9 forks source link

[Issue]: Error while setting unit to Dry mode #326

Closed nchieffo closed 3 weeks ago

nchieffo commented 4 weeks ago

Version: 4.1.17

While changing from OFF to Dry mode today I got this error.

Because Daikins when in Dry mode only accept 'auto Fan mode', do you think it would be possible to always set auto while changing?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:287
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 15:10:31 (2 occurrences)
Last logged: 15:28:23

[547074377184] Fan mode is not valid. Valid fan modes are: auto
jwillemsen commented 3 weeks ago

When changing the operation mode the fan mode is again retrieved to set it to a valid value. I think this error could happen because the set of the allowed fan modes and the current fan mode are not retrieved together as a immutable set, when you change the operation mode the set with allowed values and the current mode both change independently.

Besides this error in the log, do you see a problem in the UI or using the device? Maybe enable debug logging (see readme)

nchieffo commented 3 weeks ago

I tried this again today, and the result is somehow even more confusing. From hassio I did the following steps:

  1. from OFF to Cool
  2. from Cool to Dry
  3. from Dry to Cool
  4. from Cool to Heat
  5. from Heat to dry

This time I get the error on step 3 and step 5 from the UI it also shows an error, check screen I grabbed while doing step 3 image The daikin APP seems to show Fan speed without problems. Same applies with the Hassio climate UI, the fan speed is always at a coherent value

So there are definitely some issues in setting fan speed, and judging from what I could see, there is a double space between 'mode' and 'is', so my guess is that the extension may be sending an empty value?

2024-10-21 11:02:47.635 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547340414416] Fan mode  is not valid. Valid fan modes are: auto

home-assistant_daikin_onecta_2024-10-21T09-02-52.099Z.log

jwillemsen commented 3 weeks ago

Could you list what is the fan mode set in each step, looks is sometimes auto and sometimes a fixed value. Can you also attach your integration diagnostics.

I think you are right with the double space, something to further investigate and reproduce as part of the unit tests I have in this integration, but I do need your integration diagnostics, preferable at the start of each of the 5 steps so that I can see exactly what is set

nchieffo commented 3 weeks ago

Ok, for each step described above (added step 0) I attached the diagnostic after applying the change to mode

State 0, climate is OFF, Fan is shown as Auto, no error Integration diagnostics: daikin_onecta - Step0 - OFF.json

State 1, climate is Cool, Fan is shown as 3, no error Integration diagnostics: daikin_onecta - Step1 - Cool.json

State 2, climate is Dry, Fan is shown as Auto, no error Integration diagnostics: daikin_onecta - Step2 - Dry.json

State 3, climate is Cool, Fan is shown as 3, error Integration diagnostics: daikin_onecta - Step3 - Cool.json

State 4, climate is Heat, Fan is shown as Auto, no error Integration diagnostics: daikin_onecta - Step4 - Heat.json

State 5, climate is Heat, Fan is shown as Auto, error Integration diagnostics: daikin_onecta - Step5 - Dry.json

jwillemsen commented 3 weeks ago

I can't reproduce the problem in a unit test or locally. I have extended the logging for fan_mode/fan_modes so that we can see what this integration returns to HA, can you test the new v4.1.18 release with logging enabled?

jwillemsen commented 3 weeks ago

See also https://github.com/home-assistant/frontend/issues/19620 and #282

nchieffo commented 3 weeks ago

home-assistant_daikin_onecta_2024-10-21T11-29-17.053Z.log

jwillemsen commented 3 weeks ago

I think https://github.com/home-assistant/frontend/issues/19620#issuecomment-2213948635 is the remark that is relevant, in the log I can see that we correctly return the correct fan_mode

2024-10-21 13:29:12.359 INFO (MainThread) [custom_components.daikin_onecta.climate] Device 'Camera matrimoniale' has fan mode '3'

nchieffo commented 3 weeks ago

thanks