mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Disable by default smlight auto zigbee update switch (#126707)
disable by default auto zigbee update switch Co-authored-by: Shay Levy <levyshay1@gmail.com>
This commit is contained in:
parent
d01fb914a9
commit
6ee03460d6
@ -52,6 +52,7 @@ SWITCHES: list[SmSwitchEntityDescription] = [
|
||||
translation_key="auto_zigbee_update",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
setting=Settings.ZB_AUTOUPDATE,
|
||||
entity_registry_enabled_default=False,
|
||||
state_fn=lambda x: x.auto_zigbee,
|
||||
),
|
||||
SmSwitchEntityDescription(
|
||||
|
@ -54,12 +54,12 @@ async def test_disabled_by_default_switch(
|
||||
) -> None:
|
||||
"""Test vpn enabled switch is disabled by default ."""
|
||||
await setup_integration(hass, mock_config_entry)
|
||||
for entity in ("vpn_enabled", "auto_zigbee_update"):
|
||||
assert not hass.states.get(f"switch.mock_title_{entity}")
|
||||
|
||||
assert not hass.states.get("switch.mock_title_vpn_enabled")
|
||||
|
||||
assert (entry := entity_registry.async_get("switch.mock_title_vpn_enabled"))
|
||||
assert entry.disabled
|
||||
assert entry.disabled_by is er.RegistryEntryDisabler.INTEGRATION
|
||||
assert (entry := entity_registry.async_get(f"switch.mock_title_{entity}"))
|
||||
assert entry.disabled
|
||||
assert entry.disabled_by is er.RegistryEntryDisabler.INTEGRATION
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
|
Loading…
x
Reference in New Issue
Block a user