Skip to content

Commit

Permalink
use deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
prairiesnpr committed Jan 22, 2025
1 parent f5f9aa1 commit 821cd2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion tests/test_tuya_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@

from tests.common import ClusterListener, MockDatetime, wait_for_zigpy_tasks
import zhaquirks
from zhaquirks.tuya import TUYA_QUERY_DATA, TUYA_SET_TIME
from zhaquirks.tuya import (
TUYA_QUERY_DATA,
TUYA_SET_TIME,
TuyaPowerConfigurationCluster,
TuyaPowerConfigurationCluster2AAA,
)
from zhaquirks.tuya.builder import (
TuyaAirQualityVOC,
TuyaCO2Concentration,
Expand Down
4 changes: 3 additions & 1 deletion zhaquirks/tuya/ts0601_sensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Tuya temp and humidity sensors."""

import copy

from zigpy.quirks.v2 import EntityPlatform, EntityType
from zigpy.quirks.v2.homeassistant import PERCENTAGE, UnitOfTemperature, UnitOfTime
from zigpy.quirks.v2.homeassistant.sensor import SensorDeviceClass, SensorStateClass
Expand Down Expand Up @@ -89,7 +91,7 @@ class NoManufTimeTuyaMCUCluster(TuyaMCUCluster):
set_time_offset = 1970
set_time_local_offset = 1970

server_commands = TuyaMCUCluster.server_commands.copy()
server_commands = copy.deepcopy(TuyaMCUCluster.server_commands)
server_commands.update(
{
TUYA_SET_TIME: foundation.ZCLCommandDef(
Expand Down

0 comments on commit 821cd2b

Please sign in to comment.