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:
parent
ee602e40a6
commit
e9e44dbd97
90 changed files with 627 additions and 883 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue