mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +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",
|
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,10 +54,10 @@ 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 := entity_registry.async_get("switch.mock_title_vpn_enabled"))
|
|
||||||
assert entry.disabled
|
assert entry.disabled
|
||||||
assert entry.disabled_by is er.RegistryEntryDisabler.INTEGRATION
|
assert entry.disabled_by is er.RegistryEntryDisabler.INTEGRATION
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user