mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Avoid mutating entity descriptions in efergy (#105626)
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user