mirror of
https://github.com/home-assistant/core.git
synced 2025-08-30 09:51:37 +02:00
Remove extra check - ignore arg type
This commit is contained in:
@@ -373,10 +373,10 @@ class NumberEntity(Entity, cached_properties=CACHED_PROPERTIES_WITH_ATTR_):
|
||||
@property
|
||||
def __native_unit_of_measurement_compat(self) -> str | None:
|
||||
"""Process ambiguous units."""
|
||||
if (native_unit_of_measurement := self.native_unit_of_measurement) is None:
|
||||
return None
|
||||
native_unit_of_measurement = self.native_unit_of_measurement
|
||||
return AMBIGUOUS_UNITS.get(
|
||||
native_unit_of_measurement, native_unit_of_measurement
|
||||
native_unit_of_measurement, # type: ignore[arg-type]
|
||||
native_unit_of_measurement, # type: ignore[arg-type]
|
||||
)
|
||||
|
||||
@property
|
||||
|
@@ -474,11 +474,10 @@ class SensorEntity(Entity, cached_properties=CACHED_PROPERTIES_WITH_ATTR_):
|
||||
@property
|
||||
def __native_unit_of_measurement_compat(self) -> str | None:
|
||||
"""Process ambiguous units."""
|
||||
if (native_unit_of_measurement := self.native_unit_of_measurement) is None:
|
||||
return None
|
||||
native_unit_of_measurement = self.native_unit_of_measurement
|
||||
return AMBIGUOUS_UNITS.get(
|
||||
native_unit_of_measurement,
|
||||
native_unit_of_measurement,
|
||||
native_unit_of_measurement, # type: ignore[arg-type]
|
||||
native_unit_of_measurement, # type: ignore[arg-type]
|
||||
)
|
||||
|
||||
@cached_property
|
||||
|
Reference in New Issue
Block a user