Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 29, 2024
1 parent e5854dd commit 83b528b
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 24 deletions.
1 change: 1 addition & 0 deletions .github/update-services.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Creates a services.yaml file with the latest docs."""

import sys
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions .github/update-strings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Update strings.json and en.json from const.py."""

import json
import sys
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions custom_components/adaptive_lighting/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Adaptive Lighting integration in Home-Assistant."""

import logging
from typing import Any

Expand Down
1 change: 1 addition & 0 deletions custom_components/adaptive_lighting/adaptation_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions for adaptation commands."""

import logging
from collections.abc import AsyncGenerator
from dataclasses import dataclass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Switch for the Adaptive Lighting integration."""

from __future__ import annotations

import bisect
Expand Down
1 change: 1 addition & 0 deletions custom_components/adaptive_lighting/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config flow for Adaptive Lighting integration."""

import logging

import homeassistant.helpers.config_validation as cv
Expand Down
48 changes: 24 additions & 24 deletions custom_components/adaptive_lighting/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
)

CONF_SLEEP_TRANSITION, DEFAULT_SLEEP_TRANSITION = "sleep_transition", 1
DOCS[
CONF_SLEEP_TRANSITION
] = 'Duration of transition when "sleep mode" is toggled in seconds. 😴'
DOCS[CONF_SLEEP_TRANSITION] = (
'Duration of transition when "sleep mode" is toggled in seconds. 😴'
)

CONF_INTERVAL, DEFAULT_INTERVAL = "interval", 90
DOCS[CONF_INTERVAL] = "Frequency to adapt the lights, in seconds. 🔄"
Expand Down Expand Up @@ -112,30 +112,30 @@
)

CONF_SLEEP_RGB_COLOR, DEFAULT_SLEEP_RGB_COLOR = "sleep_rgb_color", [255, 56, 0]
DOCS[
CONF_SLEEP_RGB_COLOR
] = 'RGB color in sleep mode (used when `sleep_rgb_or_color_temp` is "rgb_color"). 🌈'
DOCS[CONF_SLEEP_RGB_COLOR] = (
'RGB color in sleep mode (used when `sleep_rgb_or_color_temp` is "rgb_color"). 🌈'
)

CONF_SLEEP_RGB_OR_COLOR_TEMP, DEFAULT_SLEEP_RGB_OR_COLOR_TEMP = (
"sleep_rgb_or_color_temp",
"color_temp",
)
DOCS[
CONF_SLEEP_RGB_OR_COLOR_TEMP
] = 'Use either `"rgb_color"` or `"color_temp"` in sleep mode. 🌙'
DOCS[CONF_SLEEP_RGB_OR_COLOR_TEMP] = (
'Use either `"rgb_color"` or `"color_temp"` in sleep mode. 🌙'
)

CONF_SUNRISE_OFFSET, DEFAULT_SUNRISE_OFFSET = "sunrise_offset", 0
DOCS[
CONF_SUNRISE_OFFSET
] = "Adjust sunrise time with a positive or negative offset in seconds. ⏰"
DOCS[CONF_SUNRISE_OFFSET] = (
"Adjust sunrise time with a positive or negative offset in seconds. ⏰"
)

CONF_SUNRISE_TIME = "sunrise_time"
DOCS[CONF_SUNRISE_TIME] = "Set a fixed time (HH:MM:SS) for sunrise. 🌅"

CONF_MIN_SUNRISE_TIME = "min_sunrise_time"
DOCS[
CONF_MIN_SUNRISE_TIME
] = "Set the earliest virtual sunrise time (HH:MM:SS), allowing for later sunrises. 🌅"
DOCS[CONF_MIN_SUNRISE_TIME] = (
"Set the earliest virtual sunrise time (HH:MM:SS), allowing for later sunrises. 🌅"
)

CONF_MAX_SUNRISE_TIME = "max_sunrise_time"
DOCS[CONF_MAX_SUNRISE_TIME] = (
Expand All @@ -144,22 +144,22 @@
)

CONF_SUNSET_OFFSET, DEFAULT_SUNSET_OFFSET = "sunset_offset", 0
DOCS[
CONF_SUNSET_OFFSET
] = "Adjust sunset time with a positive or negative offset in seconds. ⏰"
DOCS[CONF_SUNSET_OFFSET] = (
"Adjust sunset time with a positive or negative offset in seconds. ⏰"
)

CONF_SUNSET_TIME = "sunset_time"
DOCS[CONF_SUNSET_TIME] = "Set a fixed time (HH:MM:SS) for sunset. 🌇"

CONF_MIN_SUNSET_TIME = "min_sunset_time"
DOCS[
CONF_MIN_SUNSET_TIME
] = "Set the earliest virtual sunset time (HH:MM:SS), allowing for later sunsets. 🌇"
DOCS[CONF_MIN_SUNSET_TIME] = (
"Set the earliest virtual sunset time (HH:MM:SS), allowing for later sunsets. 🌇"
)

CONF_MAX_SUNSET_TIME = "max_sunset_time"
DOCS[
CONF_MAX_SUNSET_TIME
] = "Set the latest virtual sunset time (HH:MM:SS), allowing for earlier sunsets. 🌇"
DOCS[CONF_MAX_SUNSET_TIME] = (
"Set the latest virtual sunset time (HH:MM:SS), allowing for earlier sunsets. 🌇"
)

CONF_BRIGHTNESS_MODE, DEFAULT_BRIGHTNESS_MODE = "brightness_mode", "default"
DOCS[CONF_BRIGHTNESS_MODE] = (
Expand Down
1 change: 1 addition & 0 deletions custom_components/adaptive_lighting/hass_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions for HA core."""

import logging
from collections.abc import Awaitable, Callable

Expand Down
1 change: 1 addition & 0 deletions custom_components/adaptive_lighting/switch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Switch for the Adaptive Lighting integration."""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions test_dependencies.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Extracts the dependencies of the components required for testing."""

from collections import defaultdict
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fixtures for testing."""

import os
import sys

Expand Down
1 change: 1 addition & 0 deletions tests/test_config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test Adaptive Lighting config flow."""

from homeassistant import data_entry_flow
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.const import CONF_NAME
Expand Down
1 change: 1 addition & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for Adaptive Lighting integration."""

from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import CONF_NAME
from homeassistant.setup import async_setup_component
Expand Down
1 change: 1 addition & 0 deletions tests/test_switch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for Adaptive Lighting switches."""

# pylint: disable=protected-access
import asyncio
import itertools
Expand Down
1 change: 1 addition & 0 deletions webapp/homeassistant_util_color.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Color util methods."""

# Slightly modified from homeassistant.util.color at
# https://github.com/home-assistant/core/blob/798fb3e31a6ba87358adc93a4c5b772b64451712/homeassistant/util/color.py#L14
# to remove the dependency on homeassistant.util.color in sun.py
Expand Down

0 comments on commit 83b528b

Please sign in to comment.