Simplfy homekit_controller characteristic writes (#32683)

This commit is contained in:
Jc2k authored and GitHub committed 2020-03-11 09:27:20 -07:00
1 parent c56530a712
commit ffe8b94d75
10 files changed
+123 -233

No files matched your search

@@ -61,14 +61,9 @@ class HomeKitLock(HomeKitEntity, LockDevice):
async def _set_lock_state(self, state):
"""Send state command."""
characteristics = [
{
"aid": self._aid,
"iid": self._chars["lock-mechanism.target-state"],
"value": TARGET_STATE_MAP[state],
}
]
await self._accessory.put_characteristics(characteristics)
await self.async_put_characteristics(
{CharacteristicsTypes.LOCK_MECHANISM_TARGET_STATE: TARGET_STATE_MAP[state]}
)
@property
def device_state_attributes(self):