mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 14:54:04 +02:00
Merge branch 'main' into compare-service-datas-with-ignore-fields
This commit is contained in:
commit
886c2cb8d0
3 changed files with 12 additions and 4 deletions
|
|
@ -36,6 +36,8 @@ runs:
|
|||
run: |
|
||||
echo "::warning::### WARNING! Deprecation warnings muted with option '--use-pep517' please address this at some point in pytest.yaml. ###"
|
||||
pip install -r core/requirements.txt --use-pep517
|
||||
# because they decided to pull codecov the package from PyPI...
|
||||
sed -i '/codecov/d' core/requirements_test.txt
|
||||
pip install -r core/requirements_test.txt --use-pep517
|
||||
pip install -e core/ --use-pep517
|
||||
pip install ulid-transform # this is in Adaptive-lighting's manifest.json
|
||||
|
|
|
|||
2
.github/workflows/pytest.yaml
vendored
2
.github/workflows/pytest.yaml
vendored
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.10"]
|
||||
core-version: ["2023.2.5", "2023.3.6", "2023.4.0", "dev"]
|
||||
core-version: ["2023.2.5", "2023.3.6", "2023.4.6", "dev"]
|
||||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v3
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ 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
|
||||
from homeassistant.helpers.reload import async_setup_reload_service
|
||||
import voluptuous as vol
|
||||
|
||||
from .const import (
|
||||
|
|
@ -36,10 +35,13 @@ CONFIG_SCHEMA = vol.Schema(
|
|||
)
|
||||
|
||||
|
||||
async def reload_configuration_yaml(event: dict, hass: HomeAssistant):
|
||||
"""Reload configuration.yaml."""
|
||||
await hass.services.async_call("homeassistant", "check_config", {})
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: dict[str, Any]):
|
||||
"""Import integration from config."""
|
||||
# This will reload any changes the user made to any YAML configurations.
|
||||
await async_setup_reload_service(hass, DOMAIN, PLATFORMS)
|
||||
|
||||
if DOMAIN in config:
|
||||
for entry in config[DOMAIN]:
|
||||
|
|
@ -55,6 +57,10 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry):
|
|||
"""Set up the component."""
|
||||
data = hass.data.setdefault(DOMAIN, {})
|
||||
|
||||
# This will reload any changes the user made to any YAML configurations.
|
||||
# Called during 'quick reload' or hass.reload_config_entry
|
||||
hass.bus.async_listen("hass.config.entry_updated", reload_configuration_yaml)
|
||||
|
||||
undo_listener = config_entry.add_update_listener(async_update_options)
|
||||
data[config_entry.entry_id] = {UNDO_UPDATE_LISTENER: undo_listener}
|
||||
for platform in PLATFORMS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue