mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Remove legacy method from deCONZ fan and sensor tests (#121244)
This commit is contained in:
parent
e47cbf3cf7
commit
62d9020261
@ -15,19 +15,9 @@ from homeassistant.config_entries import ConfigEntry
|
|||||||
from homeassistant.const import ATTR_ENTITY_ID, STATE_OFF, STATE_ON, STATE_UNAVAILABLE
|
from homeassistant.const import ATTR_ENTITY_ID, STATE_OFF, STATE_ON, STATE_UNAVAILABLE
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
from .test_gateway import setup_deconz_integration
|
|
||||||
|
|
||||||
from tests.test_util.aiohttp import AiohttpClientMocker
|
from tests.test_util.aiohttp import AiohttpClientMocker
|
||||||
|
|
||||||
|
|
||||||
async def test_no_fans(
|
|
||||||
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker
|
|
||||||
) -> None:
|
|
||||||
"""Test that no fan entities are created."""
|
|
||||||
await setup_deconz_integration(hass, aioclient_mock)
|
|
||||||
assert len(hass.states.async_all()) == 0
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"light_payload",
|
"light_payload",
|
||||||
[
|
[
|
||||||
|
@ -25,19 +25,7 @@ from homeassistant.core import HomeAssistant
|
|||||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
from .test_gateway import setup_deconz_integration
|
|
||||||
|
|
||||||
from tests.common import async_fire_time_changed
|
from tests.common import async_fire_time_changed
|
||||||
from tests.test_util.aiohttp import AiohttpClientMocker
|
|
||||||
|
|
||||||
|
|
||||||
async def test_no_sensors(
|
|
||||||
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker
|
|
||||||
) -> None:
|
|
||||||
"""Test that no sensors in deconz results in no sensor entities."""
|
|
||||||
await setup_deconz_integration(hass, aioclient_mock)
|
|
||||||
assert len(hass.states.async_all()) == 0
|
|
||||||
|
|
||||||
|
|
||||||
TEST_DATA = [
|
TEST_DATA = [
|
||||||
( # Air quality sensor
|
( # Air quality sensor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user