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

@@ -1,7 +1,7 @@
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version. # Ruff version.
rev: v0.9.10 rev: v0.14.6
hooks: hooks:
# Run the linter. # Run the linter.
- id: ruff - id: ruff

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2024 Nathan Spencer Copyright (c) Nathan Spencer
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -65,7 +65,7 @@ class OasisDeviceLightEntity(OasisDeviceEntity, LightEntity):
@property @property
def brightness(self) -> int: def brightness(self) -> int:
""" """
Get the light's brightness on a 0255 scale. Get the light's brightness on a 0-255 scale.
Returns: Returns:
int: Brightness value between 0 and 255. int: Brightness value between 0 and 255.
@@ -125,7 +125,7 @@ class OasisDeviceLightEntity(OasisDeviceEntity, LightEntity):
Parameters: Parameters:
kwargs: Optional control parameters recognized by the method: kwargs: Optional control parameters recognized by the method:
ATTR_BRIGHTNESS (int): Brightness in the 0255 Home Assistant scale. When provided, ATTR_BRIGHTNESS (int): Brightness in the 0-255 Home Assistant scale. When provided,
it is converted and rounded up to the device's brightness scale (1..device.brightness_max). it is converted and rounded up to the device's brightness scale (1..device.brightness_max).
When omitted, uses self.device.brightness or self.device.brightness_on. When omitted, uses self.device.brightness or self.device.brightness_on.
ATTR_RGB_COLOR (tuple[int, int, int]): RGB tuple (R, G, B). When provided, it is ATTR_RGB_COLOR (tuple[int, int, int]): RGB tuple (R, G, B). When provided, it is

View File

@@ -418,7 +418,7 @@ class OasisDevice:
If the current track or its SVG content is unavailable, returns None. If the current track or its SVG content is unavailable, returns None.
Returns: Returns:
progress_percent (float | None): Percentage of the drawing completed (0100), clamped to 100; `None` if no track or SVG content is available. progress_percent (float | None): Percentage of the drawing completed (0-100), clamped to 100; `None` if no track or SVG content is available.
""" """
if not (self.track and (svg_content := self.track.get("svg_content"))): if not (self.track and (svg_content := self.track.get("svg_content"))):
return None return None

View File

@@ -77,7 +77,6 @@ DESCRIPTORS.extend(
entity_registry_enabled_default=False, entity_registry_enabled_default=False,
) )
for key in ("error", "led_color_id", "status") for key in ("error", "led_color_id", "status")
# for key in ("error_message", "led_color_id", "status")
) )