1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-12-06 18:44:14 -05:00

Formatting

This commit is contained in:
Nathan Spencer
2025-11-24 04:37:10 +00:00
parent 14223bd1c9
commit 04be6626a7
11 changed files with 61 additions and 62 deletions

View File

@@ -31,7 +31,7 @@ async def async_setup_entry(
) -> None:
"""
Set up update entities for Oasis devices from a configuration entry.
Parameters:
hass (HomeAssistant): Home Assistant core instance.
entry (OasisDeviceConfigEntry): Config entry containing runtime data used to create device update entities.
@@ -41,10 +41,10 @@ async def async_setup_entry(
def make_entities(new_devices: list[OasisDevice]):
"""
Create update entities for the given Oasis devices.
Parameters:
new_devices (list[OasisDevice]): Devices to create update entities for.
Returns:
list: A list of OasisDeviceUpdateEntity instances corresponding to each device.
"""
@@ -90,9 +90,9 @@ class OasisDeviceUpdateEntity(OasisDeviceEntity, UpdateEntity):
) -> None:
"""
Trigger installation of the latest available update on the device.
If the latest available version matches the device's currently installed software version, no action is taken. Otherwise an upgrade is started on the device.
Parameters:
version (str | None): Ignored by this implementation; the entity uses its known latest version.
backup (bool): Ignored by this implementation.
@@ -105,7 +105,7 @@ class OasisDeviceUpdateEntity(OasisDeviceEntity, UpdateEntity):
async def async_update(self) -> None:
"""
Refreshes this entity's latest software metadata.
Fetches the latest software details from the coordinator's cloud client and updates
the entity's `latest_version`, `release_summary`, and `release_url` attributes.
If no software details are returned, the entity's attributes are left unchanged.
@@ -116,4 +116,4 @@ class OasisDeviceUpdateEntity(OasisDeviceEntity, UpdateEntity):
return
self._attr_latest_version = software["version"]
self._attr_release_summary = software["description"]
self._attr_release_url = f"https://app.grounded.so/software/{software['id']}"
self._attr_release_url = f"https://app.grounded.so/software/{software['id']}"