Skip to content

Commit

Permalink
merge from HA upstream 2020.12.1-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Dec 22, 2020
1 parent 03c9673 commit 9cf40e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion home-assistant-plugin/custom_components/xknx/light.py
Expand Up @@ -86,7 +86,8 @@ def color_temp(self):
"""Return the color temperature in mireds."""
if self._device.supports_color_temperature:
kelvin = self._device.current_color_temperature
if kelvin is not None:
# Avoid division by zero if actuator reported 0 Kelvin (e.g., uninitialized DALI-Gateway)
if kelvin is not None and kelvin > 0:
return color_util.color_temperature_kelvin_to_mired(kelvin)
if self._device.supports_tunable_white:
relative_ct = self._device.current_tunable_white
Expand Down
2 changes: 1 addition & 1 deletion home-assistant-plugin/custom_components/xknx/schema.py
Expand Up @@ -112,7 +112,7 @@ class BinarySensorSchema:
),
vol.Optional(CONF_DEVICE_CLASS): cv.string,
vol.Optional(CONF_INVERT): cv.boolean,
vol.Optional(CONF_RESET_AFTER): cv.positive_int,
vol.Optional(CONF_RESET_AFTER): cv.positive_float,
}
),
)
Expand Down

0 comments on commit 9cf40e6

Please sign in to comment.