Skip to content

Commit 2fc8e45

Browse files
committed
create wifi switches for mesh slaves, but disable them by default
1 parent f7df214 commit 2fc8e45

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

homeassistant/components/fritz/switch.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,8 @@ async def async_all_entities_list(
207207
local_ip: str,
208208
) -> list[Entity]:
209209
"""Get a list of all entities."""
210-
211210
if avm_wrapper.mesh_role == MeshRoles.SLAVE:
212-
return []
211+
return [*await _async_wifi_entities_list(avm_wrapper, device_friendly_name)]
213212

214213
return [
215214
*await _async_deflection_entities_list(avm_wrapper, device_friendly_name),
@@ -563,6 +562,9 @@ def __init__(
563562

564563
self._attributes = {}
565564
self._attr_entity_category = EntityCategory.CONFIG
565+
self._attr_entity_registry_enabled_default = (
566+
avm_wrapper.mesh_role is not MeshRoles.SLAVE
567+
)
566568
self._network_num = network_num
567569

568570
switch_info = SwitchInfo(

0 commit comments

Comments
 (0)