mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-28 21:04:19 +02:00
Skip test_state_change_handlers in <2023.4
This commit is contained in:
parent
63893b87d2
commit
8d01b6ec4e
1 changed files with 8 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import logging
|
||||||
from random import randint
|
from random import randint
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
|
import homeassistant
|
||||||
from homeassistant.components.adaptive_lighting.const import (
|
from homeassistant.components.adaptive_lighting.const import (
|
||||||
ADAPT_BRIGHTNESS_SWITCH,
|
ADAPT_BRIGHTNESS_SWITCH,
|
||||||
ADAPT_COLOR_SWITCH,
|
ADAPT_COLOR_SWITCH,
|
||||||
|
|
@ -73,6 +74,7 @@ from homeassistant.helpers import entity_registry
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
from homeassistant.util.color import color_temperature_mired_to_kelvin
|
from homeassistant.util.color import color_temperature_mired_to_kelvin
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
from packaging.version import parse
|
||||||
import pytest
|
import pytest
|
||||||
import ulid_transform
|
import ulid_transform
|
||||||
import voluptuous.error
|
import voluptuous.error
|
||||||
|
|
@ -81,6 +83,8 @@ from tests.common import MockConfigEntry, mock_area_registry
|
||||||
from tests.components.demo.test_light import ENTITY_LIGHT
|
from tests.components.demo.test_light import ENTITY_LIGHT
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
HA_VERSION = parse(homeassistant.__version__)
|
||||||
|
|
||||||
|
|
||||||
SUNRISE = datetime.datetime(
|
SUNRISE = datetime.datetime(
|
||||||
year=2020,
|
year=2020,
|
||||||
|
|
@ -888,6 +892,10 @@ def test_attributes_have_changed():
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(
|
||||||
|
HA_VERSION < parse("2023.4.0"),
|
||||||
|
reason="Only applicable for homeassistant >= 2023.4.0",
|
||||||
|
)
|
||||||
@pytest.mark.dependency(depends=GLOBAL_TEST_DEPENDENCIES)
|
@pytest.mark.dependency(depends=GLOBAL_TEST_DEPENDENCIES)
|
||||||
async def test_state_change_handlers(hass):
|
async def test_state_change_handlers(hass):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue