@@ -46,13 +46,6 @@ def __init__(self, dpcode: str) -> None:
4646 """Init DPCodeWrapper."""
4747 self .dpcode = dpcode
4848
49- def _read_device_status_raw (self , device : CustomerDevice ) -> Any | None :
50- """Read the raw device status for the DPCode.
51-
52- Private helper method for `read_device_status`.
53- """
54- return device .status .get (self .dpcode )
55-
5649 def _convert_value_to_raw_value (self , device : CustomerDevice , value : Any ) -> Any :
5750 """Convert a Home Assistant value back to a raw device value.
5851
@@ -90,7 +83,7 @@ def __init__(self, dpcode: str, type_information: T) -> None:
9083 def read_device_status (self , device : CustomerDevice ) -> Any | None :
9184 """Read the device value for the dpcode."""
9285 return self .type_information .process_raw_value (
93- self . _read_device_status_raw ( device ), device
86+ device . status . get ( self . dpcode ), device
9487 )
9588
9689 @classmethod
@@ -197,7 +190,7 @@ def __init__(self, dpcode: str, mask: int) -> None:
197190
198191 def read_device_status (self , device : CustomerDevice ) -> bool | None :
199192 """Read the device value for the dpcode."""
200- if (raw_value := self . _read_device_status_raw ( device )) is None :
193+ if (raw_value := device . status . get ( self . dpcode )) is None :
201194 return None
202195 return (raw_value & (1 << self ._mask )) != 0
203196
0 commit comments