diff --git a/lib/converters/light.js b/lib/converters/light.js index e11a6254c..c4b10c551 100644 --- a/lib/converters/light.js +++ b/lib/converters/light.js @@ -208,6 +208,9 @@ function _lightAdvancedAddHueAndSat(states, objects, entity) { } state = state || {val: 0}; + if (!targetAttributes.hs_color) { + targetAttributes.hs_color = [0, 100]; + } targetAttributes.hs_color[0] = state.val / attr.max * 360; targetAttributes.color_mode = HS; };