emulated_hue: fix alexa "device not responding" (#5058)

* emulated_hue: fix alexa "device not responding"

we need to set the brightness to 100 for devices that only turn on

* emulated_hue: dont override brightness for scenes/scripts

* emulated_hue: python and semi-colons

* emulated_hue: fix output brightness level
This commit is contained in:
abmantis 2016-12-26 12:58:32 +00:00 committed by Paulus Schoutsen
parent ce24ef0c20
commit 1c1b04718f

View file

@ -288,6 +288,9 @@ def get_entity_state(config, entity):
final_brightness = round(min(1.0, level) * 255)
else:
final_state, final_brightness = cached_state
# Make sure brightness is valid
if final_brightness is None:
final_brightness = 255 if final_state else 0
return (final_state, final_brightness)