Skip to content

Commit

Permalink
Merge e0ea124 into cd04661
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrBerchenko committed Feb 4, 2019
2 parents cd04661 + e0ea124 commit 3aec574
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/components/light/__init__.py
Expand Up @@ -439,6 +439,9 @@ def state_attributes(self):
data[ATTR_MIN_MIREDS] = self.min_mireds
data[ATTR_MAX_MIREDS] = self.max_mireds

if supported_features & SUPPORT_EFFECT:
data[ATTR_EFFECT_LIST] = self.effect_list

if self.is_on:
if supported_features & SUPPORT_BRIGHTNESS:
data[ATTR_BRIGHTNESS] = self.brightness
Expand All @@ -460,7 +463,6 @@ def state_attributes(self):
data[ATTR_WHITE_VALUE] = self.white_value

if supported_features & SUPPORT_EFFECT:
data[ATTR_EFFECT_LIST] = self.effect_list
data[ATTR_EFFECT] = self.effect

return {key: val for key, val in data.items() if val is not None}
Expand Down

0 comments on commit 3aec574

Please sign in to comment.