mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 14:24:03 +02:00
Run all pre-commit filters
This commit is contained in:
parent
5c760b5f4a
commit
01fd7f96e2
9 changed files with 20 additions and 25 deletions
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
|
|
@ -1 +1 @@
|
|||
github: [basnijholz, RubenKelevra]
|
||||
github: [basnijholz, RubenKelevra]
|
||||
|
|
|
|||
1
.github/ISSUE_TEMPLATE/enhancement.md
vendored
1
.github/ISSUE_TEMPLATE/enhancement.md
vendored
|
|
@ -3,4 +3,3 @@ name: 'Enhancement'
|
|||
about: 'Suggest an improvement to an existing feature.'
|
||||
labels: kind/enhancement, need/triage
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,11 @@
|
|||
import logging
|
||||
from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
||||
from homeassistant.const import CONF_SOURCE
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
import voluptuous as vol
|
||||
|
||||
from .const import (
|
||||
_DOMAIN_SCHEMA,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
"""Config flow for Adaptive Lighting integration."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.const import CONF_NAME
|
||||
from homeassistant.core import callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
import voluptuous as vol
|
||||
|
||||
from .const import ( # pylint: disable=unused-import
|
||||
CONF_LIGHTS,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
"""Constants for the Adaptive Lighting integration."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.light import VALID_TRANSITION
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
import voluptuous as vol
|
||||
|
||||
ICON = "mdi:theme-light-dark"
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ import math
|
|||
from typing import Any
|
||||
|
||||
import astral
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS,
|
||||
ATTR_BRIGHTNESS_PCT,
|
||||
|
|
@ -27,25 +25,27 @@ from homeassistant.components.light import (
|
|||
ATTR_HS_COLOR,
|
||||
ATTR_KELVIN,
|
||||
ATTR_RGB_COLOR,
|
||||
ATTR_SUPPORTED_COLOR_MODES,
|
||||
ATTR_TRANSITION,
|
||||
ATTR_XY_COLOR,
|
||||
DOMAIN as LIGHT_DOMAIN,
|
||||
COLOR_MODE_BRIGHTNESS,
|
||||
COLOR_MODE_COLOR_TEMP,
|
||||
COLOR_MODE_HS,
|
||||
COLOR_MODE_RGB,
|
||||
COLOR_MODE_RGBW,
|
||||
COLOR_MODE_XY,
|
||||
)
|
||||
from homeassistant.components.light import (
|
||||
SUPPORT_BRIGHTNESS,
|
||||
SUPPORT_COLOR,
|
||||
SUPPORT_COLOR_TEMP,
|
||||
SUPPORT_TRANSITION,
|
||||
VALID_TRANSITION,
|
||||
is_on,
|
||||
COLOR_MODE_RGB,
|
||||
COLOR_MODE_RGBW,
|
||||
COLOR_MODE_HS,
|
||||
COLOR_MODE_XY,
|
||||
COLOR_MODE_COLOR_TEMP,
|
||||
COLOR_MODE_BRIGHTNESS,
|
||||
ATTR_SUPPORTED_COLOR_MODES,
|
||||
)
|
||||
|
||||
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN, SwitchEntity
|
||||
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN
|
||||
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
|
||||
from homeassistant.components.switch import SwitchEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
ATTR_DOMAIN,
|
||||
|
|
@ -88,6 +88,7 @@ from homeassistant.util.color import (
|
|||
color_xy_to_hs,
|
||||
)
|
||||
import homeassistant.util.dt as dt_util
|
||||
import voluptuous as vol
|
||||
|
||||
from .const import (
|
||||
ADAPT_BRIGHTNESS_SWITCH,
|
||||
|
|
@ -97,7 +98,6 @@ from .const import (
|
|||
ATTR_TURN_ON_OFF_LISTENER,
|
||||
CONF_DETECT_NON_HA_CHANGES,
|
||||
CONF_INITIAL_TRANSITION,
|
||||
CONF_SLEEP_TRANSITION,
|
||||
CONF_INTERVAL,
|
||||
CONF_LIGHTS,
|
||||
CONF_MANUAL_CONTROL,
|
||||
|
|
@ -110,6 +110,7 @@ from .const import (
|
|||
CONF_SEPARATE_TURN_ON_COMMANDS,
|
||||
CONF_SLEEP_BRIGHTNESS,
|
||||
CONF_SLEEP_COLOR_TEMP,
|
||||
CONF_SLEEP_TRANSITION,
|
||||
CONF_SUNRISE_OFFSET,
|
||||
CONF_SUNRISE_TIME,
|
||||
CONF_SUNSET_OFFSET,
|
||||
|
|
|
|||
|
|
@ -46,4 +46,4 @@
|
|||
"option_error": "Fehlerhafte Option"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
from collections import defaultdict
|
||||
|
||||
with open("core/requirements_test_all.txt") as f:
|
||||
lines = f.readlines()
|
||||
|
||||
|
|
|
|||
|
|
@ -755,7 +755,7 @@ def test_attributes_have_changed():
|
|||
@pytest.mark.parametrize("wait", [True, False])
|
||||
async def test_expand_light_groups(hass, wait):
|
||||
"""Test expanding light groups."""
|
||||
await setup_switch(hass, {})
|
||||
await setup_lights_and_switch(hass, {})
|
||||
lights = ["light.ceiling_lights", "light.kitchen_lights"]
|
||||
await async_setup_component(
|
||||
hass,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue