Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions homeassistant/components/light/xiaomi_aqara.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, device, name, xiaomi_hub):
"""Initialize the XiaomiGatewayLight."""
self._data_key = 'rgb'
self._hs = (0, 0)
self._brightness = 180
self._brightness = 100

XiaomiDevice.__init__(self, device, name, xiaomi_hub)

Expand Down Expand Up @@ -64,15 +64,15 @@ def parse_data(self, data, raw_data):
brightness = rgba[0]
rgb = rgba[1:]

self._brightness = int(255 * brightness / 100)
self._brightness = brightness
self._hs = color_util.color_RGB_to_hs(*rgb)
self._state = True
return True

@property
def brightness(self):
"""Return the brightness of this light between 0..255."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the doc string too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the property self.brightness is actually 0..255.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, sorry

return self._brightness
return int(255 * self._brightness / 100)

@property
def hs_color(self):
Expand Down