tschamm / boschshcpy

Bosch Smart Home Controller API Python Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueError: 'SMOKE_TEST_FAILED' is not a valid SmokeDetectorCheckService.State

rum0s opened this issue · comments

commented

Hi,

I tried to execute

'for device in session.devices:
device.summary() `

and get the following:

Device Service: SmokeDetectorCheck
State: {'@type': 'smokeDetectorCheckState', 'value': 'SMOKE_TEST_FAILED'}
Path: /devices/hdm:ZigBee:xyz2452935235235235/services/SmokeDetectorCheck
Traceback (most recent call last):
File "/home/user/bsh/shc_test.py", line 21, in
device.summary()
File "/home/user/.local/lib/python3.9/site-packages/boschshcpy/models_impl.py", line 531, in summary
super().summary()
File "/home/user/.local/lib/python3.9/site-packages/boschshcpy/device.py", line 142, in summary
device_service.summary()
File "/home/user/.local/lib/python3.9/site-packages/boschshcpy/services_impl.py", line 282, in summary
print(f" smokeDetectorCheckState : {self.value}")
File "/home/user/.local/lib/python3.9/site-packages/boschshcpy/services_impl.py", line 278, in value
return self.State(self.state["value"])
File "/usr/lib/python3.9/enum.py", line 384, in call
return cls.new(cls, value)
File "/usr/lib/python3.9/enum.py", line 702, in new
raise ve_exc
ValueError: 'SMOKE_TEST_FAILED' is not a valid SmokeDetectorCheckService.State

Moreover is it possible to use a encrpyted private key when opening the SHCSession? How can the password be provided?

Thanks for reporting. The failure state seems to be missing.

Encrypted private keys are currently not supported by python requests library.

commented

Thank you very much for answering :)

Fixed. Thanks again for reporting!