Skip to content

Commit

Permalink
Remove incorrect device class checks (#219)
Browse files Browse the repository at this point in the history
Remove device class checks
  • Loading branch information
dmulcahey authored Oct 2, 2024
1 parent 9945b69 commit 82628cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zha/application/platforms/number/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def _init_from_quirks_metadata(self, entity_metadata: NumberMetadata) -> None:
Platform.NUMBER.value,
_LOGGER,
)
if entity_metadata.device_class is None and entity_metadata.unit is not None:
if entity_metadata.unit is not None:
self._attr_native_unit_of_measurement = validate_unit(
entity_metadata.unit
).value
Expand Down
2 changes: 1 addition & 1 deletion zha/application/platforms/sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _init_from_quirks_metadata(self, entity_metadata: ZCLSensorMetadata) -> None
Platform.SENSOR.value,
_LOGGER,
)
if entity_metadata.device_class is None and entity_metadata.unit is not None:
if entity_metadata.unit is not None:
self._attr_native_unit_of_measurement = validate_unit(
entity_metadata.unit
).value
Expand Down

0 comments on commit 82628cb

Please sign in to comment.