mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-10 13:54:04 +02:00
[pre-commit.ci] pre-commit autoupdate (#1592)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.16.5 → v0.16.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.16.5...v0.16.6) * test: avoid mired rounding boundary --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bas Nijholt <bas@nijho.lt>
This commit is contained in:
parent
7c445af63b
commit
51ea83dba3
2 changed files with 4 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ repos:
|
|||
files: ^README[^/]*\.md$
|
||||
args: ["--notitle"]
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.16.5
|
||||
rev: v0.16.6
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ["--fix"]
|
||||
|
|
|
|||
|
|
@ -1537,8 +1537,10 @@ async def test_apply_updates_non_ha_change_baseline(
|
|||
)
|
||||
|
||||
direction = 1 if manual_value < adaptive_value else -1
|
||||
# Legacy template lights round via mireds; 70 K keeps one reported step
|
||||
# below 100 K and two steps above it across the configured range.
|
||||
small_change = (
|
||||
15 if manual_attribute == LightControlAttributes.BRIGHTNESS else 60
|
||||
15 if manual_attribute == LightControlAttributes.BRIGHTNESS else 70
|
||||
)
|
||||
freezer.tick(90)
|
||||
set_physical_state(manual_value + direction * small_change)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue