Skip to content

Commit

Permalink
fix: Add hs null check to avoid light crash (#748)
Browse files Browse the repository at this point in the history
Avoid a crash on the hs light check if none is set.

Fixes #746
  • Loading branch information
cbrand authored Jul 11, 2024
1 parent bcab347 commit 6591bfc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/tapo/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def brightness(self):

@property
def hs_color(self):
if self.device.hs is None:
return None

(hue, saturation) = (self.device.hs.hue, self.device.hs.saturation)
color_temp = self.device.color_temp
if (
Expand Down

0 comments on commit 6591bfc

Please sign in to comment.