mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Avoid mutating entity descriptions in efergy (#105626)
This commit is contained in:
parent
dff7725c1f
commit
abac68f158
@ -1,6 +1,7 @@
|
||||
"""Support for Efergy sensors."""
|
||||
from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
from re import sub
|
||||
from typing import cast
|
||||
|
||||
@ -121,7 +122,10 @@ async def async_setup_entry(
|
||||
)
|
||||
)
|
||||
else:
|
||||
description.entity_registry_enabled_default = len(api.sids) > 1
|
||||
description = dataclasses.replace(
|
||||
description,
|
||||
entity_registry_enabled_default=len(api.sids) > 1,
|
||||
)
|
||||
for sid in api.sids:
|
||||
sensors.append(
|
||||
EfergySensor(
|
||||
|
Loading…
x
Reference in New Issue
Block a user