vincentwolsink / home_assistant_micronova_agua_iot

Home Assistant integration controlling heating devices connected via the Agua IOT platform of Micronova
Apache License 2.0
24 stars 15 forks source link

Error whil trying to set fan mode white climate sensor #120

Closed 38decibel closed 6 months ago

38decibel commented 6 months ago

Hello, In the Klover application my stove has 4 configuration parameters: Ventilation (OFF, from 1 to 5 and A), Power (from 1 to 5), Stand by (On or OFF) and Temperature (from 7 to 40). Screenshot_20231219_155316_Klover Home Screenshot_20231219_155323_Klover Home

In Home Assistant, AguaIOT reports 2 climate entities. The first, with the parameters Temperature and Power. Moreover this last parameter is displayed "Fan mode" instead of "Power". Screenshot_20231219_155336_Home Assistant

The second climate entity has only the parameter "Fan mode" (the real one this time). Screenshot_20231219_155342_Home Assistant

At first, I have a problem when I want to change the parameter "Fan mode". Home Assistant indicates "Climate/set_fan_mode service call failed. Value muste be between 0 and 6." Would it be possible to fix this problem please? Screenshot_20231218_181344_Home Assistant Secondly, is it possible to combine all the parameters in a single climate entity?

Thank you very much for your work.

HA Core log : `Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:238 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 16:38:57 (1 occurrences) Last logged: 16:38:57

[547647552192] Value must be between 0 and 6 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 878, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/aguaiot/climate.py", line 358, in async_set_fan_mode await self._device.set_register_value_description( File "/config/custom_components/aguaiot/aguaiot.py", line 611, in set_register_value_description await self.set_register_value(key, value) File "/config/custom_components/aguaiot/aguaiot.py", line 585, in set_register_value value = self.prepare_value_for_writing(key, value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/aguaiot/aguaiot.py", line 455, in prepare_value_for_writing raise ValueError( ValueError: Value must be between 0 and 6`

vincentwolsink commented 6 months ago

Hi @38decibel, thank you for the detailed bug report. I answered upon most of your questions/comments here.

On the value error I will take a look. Can you please supply your diagnostics file?

38decibel commented 6 months ago

Please find my diagnostic file config_entry-aguaiot-eddedabcfdf71fb41efe83fd4e1718fb.json

vincentwolsink commented 6 months ago

Value error should be fixed in v0.3.5.

38decibel commented 6 months ago

Hi,

Thanks a lot, that's work fine !