Skip to content

Commit 15328a4

Browse files
authored
Cleanup unused function in Tuya util (home-assistant#157227)
1 parent 083cfb8 commit 15328a4

File tree

1 file changed

+0
-20
lines changed
  • homeassistant/components/tuya

1 file changed

+0
-20
lines changed

homeassistant/components/tuya/util.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,6 @@ def parse_dptype(dptype: str) -> DPType | None:
5252
return _DPTYPE_MAPPING.get(dptype)
5353

5454

55-
def get_dptype(
56-
device: CustomerDevice, dpcode: DPCode | None, *, prefer_function: bool = False
57-
) -> DPType | None:
58-
"""Find a matching DPType type information for this device DPCode."""
59-
if dpcode is None:
60-
return None
61-
62-
lookup_tuple = (
63-
(device.function, device.status_range)
64-
if prefer_function
65-
else (device.status_range, device.function)
66-
)
67-
68-
for device_specs in lookup_tuple:
69-
if current_definition := device_specs.get(dpcode):
70-
return parse_dptype(current_definition.type)
71-
72-
return None
73-
74-
7555
def remap_value(
7656
value: float,
7757
from_min: float = 0,

0 commit comments

Comments
 (0)