Skip to content

Commit

Permalink
💡 fix color mode for light
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Mar 20, 2024
1 parent 95a2f90 commit c492a16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/xiaomi_miot/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(self, config: dict, miot_service: MiotService, **kwargs):
if prop := self._miot_service.spec.get_property(prop):
self._prop_color = prop

self._attr_color_mode = ColorMode.UNKNOWN
self._attr_color_mode = None
self._attr_supported_color_modes = set()
self._is_percentage_color_temp = None
if self._prop_color_temp:
Expand Down Expand Up @@ -174,7 +174,7 @@ def turn_on(self, **kwargs):
ret = self.set_property(self._prop_brightness, bri)
else:
ret = self.set_property(self._prop_power, True)
self._attr_color_mode = ColorMode.UNKNOWN
self._attr_color_mode = None

if self._prop_brightness and ATTR_BRIGHTNESS in kwargs:
brightness = kwargs[ATTR_BRIGHTNESS]
Expand Down

1 comment on commit c492a16

@al-one
Copy link
Owner Author

@al-one al-one commented on c492a16 Apr 10, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.