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:
@@ -1,7 +1,7 @@
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.9.10
|
||||
rev: v0.14.6
|
||||
hooks:
|
||||
# Run the linter.
|
||||
- id: ruff
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Nathan Spencer
|
||||
Copyright (c) Nathan Spencer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -65,7 +65,7 @@ class OasisDeviceLightEntity(OasisDeviceEntity, LightEntity):
|
||||
@property
|
||||
def brightness(self) -> int:
|
||||
"""
|
||||
Get the light's brightness on a 0–255 scale.
|
||||
Get the light's brightness on a 0-255 scale.
|
||||
|
||||
Returns:
|
||||
int: Brightness value between 0 and 255.
|
||||
@@ -125,7 +125,7 @@ class OasisDeviceLightEntity(OasisDeviceEntity, LightEntity):
|
||||
|
||||
Parameters:
|
||||
kwargs: Optional control parameters recognized by the method:
|
||||
ATTR_BRIGHTNESS (int): Brightness in the 0–255 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).
|
||||
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
|
||||
|
||||
@@ -418,7 +418,7 @@ class OasisDevice:
|
||||
If the current track or its SVG content is unavailable, returns None.
|
||||
|
||||
Returns:
|
||||
progress_percent (float | None): Percentage of the drawing completed (0–100), 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"))):
|
||||
return None
|
||||
|
||||
@@ -77,7 +77,6 @@ DESCRIPTORS.extend(
|
||||
entity_registry_enabled_default=False,
|
||||
)
|
||||
for key in ("error", "led_color_id", "status")
|
||||
# for key in ("error_message", "led_color_id", "status")
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user