Remove is_on function from homeassistant.components (#125104)

* Remove `is_on` method from `homeassistant.components`

* Cleanup test
This commit is contained in:
Jan Bouwhuis
2024-09-03 06:57:25 +02:00
committed by GitHub
parent d68ee8dcea
commit 0c18b2e7ff
2 changed files with 0 additions and 59 deletions

View File

@@ -7,7 +7,6 @@ import voluptuous as vol
import yaml
from homeassistant import config
import homeassistant.components as comps
from homeassistant.components.homeassistant import (
ATTR_ENTRY_ID,
ATTR_SAFE_MODE,
@@ -46,15 +45,6 @@ from tests.common import (
)
async def test_is_on(hass: HomeAssistant) -> None:
"""Test is_on method."""
with pytest.raises(
RuntimeError,
match="Detected code that uses homeassistant.components.is_on. This is deprecated and will stop working",
):
assert comps.is_on(hass, "light.Bowl")
async def test_turn_on_without_entities(hass: HomeAssistant) -> None:
"""Test turn_on method without entities."""
await async_setup_component(hass, ha.DOMAIN, {})