Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Dec 23, 2023
1 parent c862607 commit 570429e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions custom_components/battery_notes/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ def async_get_device(self, device_id) -> DeviceEntry:
res = self.devices.get(device_id)
return attr.asdict(res) if res else None

# @callback
# def async_get_device(self):
# """Get an existing DeviceEntry by id."""
# res = {}
# for (key, val) in self.devices.items():
# res[key] = attr.asdict(val)
# return res
@callback
def async_get_devices(self):
"""Get an existing DeviceEntry by id."""
res = {}
for (key, val) in self.devices.items():
res[key] = attr.asdict(val)
return res

@callback
def async_create_device(self, device_id: str, data: dict) -> DeviceEntry:
Expand Down

0 comments on commit 570429e

Please sign in to comment.