Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown error when setting temperature out of range #107655

Closed
jm-cook opened this issue Jan 9, 2024 · 3 comments · Fixed by #107665
Closed

Unknown error when setting temperature out of range #107655

jm-cook opened this issue Jan 9, 2024 · 3 comments · Fixed by #107665

Comments

@jm-cook
Copy link
Contributor

jm-cook commented Jan 9, 2024

The problem

It is possible to attempt to set the temperature to a value outside of the permitted range, for example 32.5 degrees. This results in an "unknown error" reported to the front end and a message in the logs.

What version of Home Assistant Core has the issue?

2024.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

flexit_bacnet

Link to integration documentation on our website

https://www.home-assistant.io/integrations/flexit_bacnet

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-01-09 14:59:54.430 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1491375464]
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/flexit_bacnet/bacnet.py", line 502, in write
return _parse_write_property_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flexit_bacnet/bacnet.py", line 411, in _parse_write_property_response
raise DecodingError(f"unsupported response type: {apdu_type}")
flexit_bacnet.bacnet.DecodingError: unsupported response type: 5
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/flexit_bacnet/climate.py", line 109, in async_set_temperature
await self._device.set_air_temp_setpoint_away(temperature)
File "/usr/local/lib/python3.11/site-packages/flexit_bacnet/device.py", line 162, in set_air_temp_setpoint_away
await self._set_value(AIR_TEMP_SETPOINT_AWAY, temperature)
File "/usr/local/lib/python3.11/site-packages/flexit_bacnet/device.py", line 47, in _set_value
await self.bacnet.write(device_property, value)
File "/usr/local/lib/python3.11/site-packages/flexit_bacnet/bacnet.py", line 504, in write
raise DecodingError(
flexit_bacnet.bacnet.DecodingError: response decoding failed: unsupported response type: 5
810a000d010050010f91029125
The above exception was the direct cause of the following exception:
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 2149, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2186, 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 882, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 731, in async_service_temperature_set
await entity.async_set_temperature(**kwargs)
File "/usr/src/homeassistant/homeassistant/components/flexit_bacnet/climate.py", line 113, in async_set_temperature
raise HomeAssistantError from exc
homeassistant.exceptions.HomeAssistantError

Additional information

image

image

@home-assistant
Copy link

home-assistant bot commented Jan 9, 2024

Hey there @lellky, @piotrbulinski, mind taking a look at this issue as it has been labeled with an integration (flexit_bacnet) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of flexit_bacnet can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign flexit_bacnet Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


flexit_bacnet documentation
flexit_bacnet source
(message by IssueLinks)

@lellky
Copy link
Contributor

lellky commented Jan 9, 2024

Hi! Thanks for the report.

I have verified that it is possible to set a maximum of 30 degrees in the Flexit Go app. Trying to set 30 degrees in Home Assistant works. But as you say, it crashes if you go above that threshold. I will look into this as soon as possible.

@lellky
Copy link
Contributor

lellky commented Jan 9, 2024

Please go ahead and review the above PR.

It adds max and min temp (30 and 10, same as the app) for the flexit_bacnet integration and hopefully fixes the issue.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants