Skip to content
Snippets Groups Projects
Unverified Commit 6ee03460 authored by TimL's avatar TimL Committed by GitHub
Browse files

Disable by default smlight auto zigbee update switch (#126707)


disable by default auto zigbee update switch

Co-authored-by: default avatarShay Levy <levyshay1@gmail.com>
parent d01fb914
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,7 @@ SWITCHES: list[SmSwitchEntityDescription] = [ ...@@ -52,6 +52,7 @@ SWITCHES: list[SmSwitchEntityDescription] = [
translation_key="auto_zigbee_update", translation_key="auto_zigbee_update",
entity_category=EntityCategory.CONFIG, entity_category=EntityCategory.CONFIG,
setting=Settings.ZB_AUTOUPDATE, setting=Settings.ZB_AUTOUPDATE,
entity_registry_enabled_default=False,
state_fn=lambda x: x.auto_zigbee, state_fn=lambda x: x.auto_zigbee,
), ),
SmSwitchEntityDescription( SmSwitchEntityDescription(
......
...@@ -54,12 +54,12 @@ async def test_disabled_by_default_switch( ...@@ -54,12 +54,12 @@ async def test_disabled_by_default_switch(
) -> None: ) -> None:
"""Test vpn enabled switch is disabled by default .""" """Test vpn enabled switch is disabled by default ."""
await setup_integration(hass, mock_config_entry) 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(f"switch.mock_title_{entity}"))
assert entry.disabled
assert (entry := entity_registry.async_get("switch.mock_title_vpn_enabled")) assert entry.disabled_by is er.RegistryEntryDisabler.INTEGRATION
assert entry.disabled
assert entry.disabled_by is er.RegistryEntryDisabler.INTEGRATION
@pytest.mark.usefixtures("entity_registry_enabled_by_default") @pytest.mark.usefixtures("entity_registry_enabled_by_default")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment