feat: IP-Adresse standardmaessig als Entitaet aktiv
Die IP ist der Wert, den man beim Suchen einer Lampe zuerst braucht - als abgeschaltete Diagnose-Entitaet war sie genau dann nicht da.
This commit is contained in:
@@ -13,7 +13,7 @@ from pytest_homeassistant_custom_component.common import MockConfigEntry, async_
|
||||
|
||||
from tests.helpers import entity_id_for
|
||||
|
||||
DISABLED_KEYS = ("ip_address", "free_heap", "last_ota_error", "boot_time")
|
||||
DISABLED_KEYS = ("free_heap", "last_ota_error", "boot_time")
|
||||
|
||||
|
||||
async def _enable_all(
|
||||
@@ -41,11 +41,12 @@ async def _poll(hass: HomeAssistant, freezer: FrozenDateTimeFactory, seconds: in
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
||||
async def test_signal_enabled_others_disabled_by_default(
|
||||
async def test_signal_and_ip_enabled_others_disabled_by_default(
|
||||
hass: HomeAssistant, init_integration
|
||||
) -> None:
|
||||
registry = er.async_get(hass)
|
||||
assert hass.states.get(entity_id_for(hass, "sensor", "rssi")).state == "-61"
|
||||
assert hass.states.get(entity_id_for(hass, "sensor", "ip_address")).state == "192.168.2.22"
|
||||
for key in DISABLED_KEYS:
|
||||
entry = registry.async_get(entity_id_for(hass, "sensor", key))
|
||||
assert entry.disabled_by is er.RegistryEntryDisabler.INTEGRATION, key
|
||||
|
||||
Reference in New Issue
Block a user