mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 04:20:17 +00:00
Remove is_on function from homeassistant.components (#125104)
* Remove `is_on` method from `homeassistant.components` * Cleanup test
This commit is contained in:
@@ -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, {})
|
||||
|
||||
Reference in New Issue
Block a user