Skip to content

Commit

Permalink
🔢 improve for number sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Nov 22, 2024
1 parent 95729fb commit 82028bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/xiaomi_miot/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def get_state(self) -> dict:
def set_state(self, data: dict):
value = data.get(self.attr)
prop = self._miot_property
if prop.value_range:
if prop and prop.value_range:
if not prop.range_min() <= value <= prop.range_max():
value = None
if value is not None:
Expand Down

0 comments on commit 82028bb

Please sign in to comment.