Skip to content

Commit 3302fe5

Browse files
committed
Revert "Fixing Issue #52 compatibility with Deconz and Homekit hue"
This reverts commit 91555fc.
1 parent cdd6c60 commit 3302fe5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

logic/filters.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def get_items(self):
122122
for lid, light in lights.items():
123123
title = light['name']
124124

125-
if 'state' in light and 'on' in light['state'] and light['state']['on']:
125+
if light['state']['on']:
126126
subtitle = []
127127
if light['state'].get('hue'):
128128
subtitle.append('hue: {hue}'.format(

logic/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def create_light_icon(lid, light_data):
5959
rgb_value = colorsys.hsv_to_rgb(0, 0, float(light_data['state']['bri']) / 255)
6060
rgb_value = tuple([255 * x for x in rgb_value])
6161
else:
62-
rgb_value = (255, 255, 255) if ('state' in light_data and 'on' in light_data['state'] and light_data['state']['on']) else (0, 0, 0)
62+
rgb_value = (255, 255, 255) if light_data['state']['on'] else (0, 0, 0)
6363

6464
f = open('icons/%s.png' % lid, 'wb')
6565
w = png.Writer(1, 1)

0 commit comments

Comments
 (0)