Skip to content

Commit

Permalink
💡 fix brightness for light (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Dec 18, 2024
1 parent 9c803f0 commit 5bff16a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/xiaomi_miot/core/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class MiotBrightnessConv(MiotPropConv):
def decode(self, device: 'Device', payload: dict, value: int):
max = self.prop.range_max()
if max != None:
super().encode(device, payload, value / max * 255.0)
super().decode(device, payload, value / max * 255.0)

def encode(self, device: 'Device', payload: dict, value: float):
max = self.prop.range_max()
Expand Down

0 comments on commit 5bff16a

Please sign in to comment.