Fix callback and async (#31281)

* Fix callback and async

* Fix a return

* Fix test

* Fix mqtt tests

* Fix some more callbacks
This commit is contained in:
Paulus Schoutsen 2020-01-29 13:59:45 -08:00 committed by GitHub
parent ee602e40a6
commit e9e44dbd97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
90 changed files with 627 additions and 883 deletions

View file

@ -45,6 +45,7 @@ class EntityMapStorage:
"""Get a pairing cache item."""
return self.storage_data.get(homekit_id)
@callback
def async_create_or_update_map(self, homekit_id, config_num, accessories):
"""Create a new pairing cache."""
data = {"config_num": config_num, "accessories": accessories}
@ -52,6 +53,7 @@ class EntityMapStorage:
self._async_schedule_save()
return data
@callback
def async_delete_map(self, homekit_id):
"""Delete pairing cache."""
if homekit_id not in self.storage_data: