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

Setting thermostat to X degrees leads to error #30294

Closed
darootler opened this issue Dec 30, 2019 · 4 comments · Fixed by #34073
Closed

Setting thermostat to X degrees leads to error #30294

darootler opened this issue Dec 30, 2019 · 4 comments · Fixed by #34073
Assignees

Comments

@darootler
Copy link

darootler commented Dec 30, 2019

Home Assistant release with the issue:
hassos: "2.12"
homeassistant: 0.103.5
machine: raspberrypi3
supervisor: "193"

Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io

Component/platform:
homekit

Description of problem:
If i set a devolo thermostat to X degrees using Siri i am getting the following error. After that error if i repeat the command everthing is working properly.

Here is the error:

Exception in set_characteristics: 3
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyhap/hap_server.py", line 522, in handle_set_characteristics
    self.client_address)
  File "/usr/local/lib/python3.7/site-packages/pyhap/accessory_driver.py", line 641, in set_characteristics
    char.client_update_value(cq[HAP_REPR_VALUE])
  File "/usr/local/lib/python3.7/site-packages/pyhap/characteristic.py", line 214, in client_update_value
    self.setter_callback(value)
  File "/usr/src/homeassistant/homeassistant/components/homekit/type_thermostats.py", line 228, in set_heat_cool
    hass_value = self.hc_homekit_to_hass[value]
KeyError: 3

Regards
Richard

@darootler darootler changed the title Setting thermostat to 0 degrees leads to error Setting thermostat to X degrees leads to error Mar 21, 2020
@bdraco
Copy link
Member

bdraco commented Apr 5, 2020

@darootler Would you please retest this on 0.108 when it comes out and let us know if its fixed

@darootler
Copy link
Author

@darootler Would you please retest this on 0.108 when it comes out and let us know if its fixed

I just updated HA to version 0.108.1 and i am able to reproduce the error:

Logger: pyhap.hap_server
Source: components/homekit/type_thermostats.py:254
First occurred: 1:16:31 PM (1 occurrences)
Last logged: 1:16:31 PM

Exception in set_characteristics: 3
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyhap/hap_server.py", line 559, in handle_set_characteristics
    self.client_address)
  File "/usr/local/lib/python3.7/site-packages/pyhap/accessory_driver.py", line 652, in set_characteristics
    char.client_update_value(cq[HAP_REPR_VALUE], client_addr)
  File "/usr/local/lib/python3.7/site-packages/pyhap/characteristic.py", line 215, in client_update_value
    self.setter_callback(value)
  File "/usr/src/homeassistant/homeassistant/components/homekit/type_thermostats.py", line 254, in set_heat_cool
    hass_value = self.hc_homekit_to_hass[value]
KeyError: 3

Regards
Richard

@bdraco bdraco self-assigned this Apr 9, 2020
@bdraco
Copy link
Member

bdraco commented Apr 11, 2020

May be fixed by #33809 or #33701 which will be in 0.109

@bdraco
Copy link
Member

bdraco commented Apr 12, 2020

#34073 should resolve most of these type of issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants