Skip to content

Commit

Permalink
Remove state class "measurement" when there is no UOM
Browse files Browse the repository at this point in the history
This should fix the newly introduced strict check that causes this sensor to fail
  • Loading branch information
catchdave authored Sep 29, 2023
1 parent d4f210a commit dc88f1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/purpleair/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def native_value(self):

@property
def state_class(self):
return 'measurement'
return 'measurement' if self._uom is not None else None

@property
def unique_id(self):
Expand Down

0 comments on commit dc88f1a

Please sign in to comment.