Update python-wink version and multiple wink fixes/updates. (#11833)

This commit is contained in:
William Scanlon 2018-01-25 11:31:38 -05:00 committed by GitHub
parent 3d9ff372fc
commit 5123487705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 42 additions and 10 deletions

View file

@ -143,6 +143,13 @@ class WinkHub(WinkBinarySensorDevice):
_attributes['update_needed'] = self.wink.update_needed()
_attributes['firmware_version'] = self.wink.firmware_version()
_attributes['pairing_mode'] = self.wink.pairing_mode()
_kidde_code = self.wink.kidde_radio_code()
if _kidde_code is not None:
# The service call to set the Kidde code
# takes a string of 1s and 0s so it makes
# sense to display it to the user that way
_formatted_kidde_code = "{:b}".format(_kidde_code).zfill(8)
_attributes['kidde_radio_code'] = _formatted_kidde_code
return _attributes