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:
Michael Sauer
2026-09-22 23:20:14 +02:00
parent 5885288f6f
commit 83618b19fd
2 changed files with 3 additions and 3 deletions
-1
View File
@@ -56,7 +56,6 @@ SENSORS = (
NinlightSensorDescription(
key="ip_address",
translation_key="ip_address",
entity_registry_enabled_default=False,
value_fn=lambda data: _wifi(data).get("ip"),
),
NinlightSensorDescription(
+3 -2
View File
@@ -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