With HA 0.80 some API elements have been removed, which this component was using. The following patch should help to bring it back to work:
λ diff -u switch/circadian_lighting.py.orig switch/circadian_lighting.py
--- circadian_lighting.py.orig 2018-10-13 21:29:26.139165300 +0200
+++ circadian_lighting.py 2018-10-13 21:20:02.978286000 +0200
@@ -14,11 +14,10 @@
from homeassistant.helpers.dispatcher import dispatcher_connect
from homeassistant.helpers.event import track_state_change
from homeassistant.helpers.restore_state import async_get_last_state
-from homeassistant.components.light import (
- is_on, turn_on)
+from homeassistant.components.light import (is_on, DOMAIN as LIGHT_DOMAIN)
from homeassistant.components.switch import SwitchDevice
from homeassistant.const import (
- CONF_NAME, CONF_PLATFORM, STATE_ON)
+ CONF_NAME, CONF_PLATFORM, STATE_ON, SERVICE_TURN_ON)
from homeassistant.util import slugify
from homeassistant.util.color import (
color_RGB_to_xy, color_temperature_kelvin_to_mired, color_temperature_to_rgb)
@@ -263,39 +262,41 @@
if self._attributes['lights_ct'] is not None and light in self._attributes['lights_ct']:
mired = int(self.calc_ct())
if is_on(self.hass, light):
- turn_on(self.hass, light,
+ self.hass.services.call(LIGHT_DOMAIN, SERVICE_TURN_ON, dict(
color_temp=mired,
brightness=brightness,
- transition=transition)
+ transition=transition,
+ entity_id=light))
_LOGGER.debug(light + " CT Adjusted - color_temp: " + str(mired) + ", brightness: " + str(brightness) + ", transition: " + str(transition))
"""Set color of array of rgb light."""
if self._attributes['lights_rgb'] is not None and light in self._attributes['lights_rgb']:
rgb = self.calc_rgb()
if is_on(self.hass, light):
- turn_on(self.hass, light,
+ self.hass.services.call(LIGHT_DOMAIN, SERVICE_TURN_ON, dict(
rgb_color=rgb,
brightness=brightness,
- transition=transition)
+ transition=transition,
+ entity_id=light))
_LOGGER.debug(light + " RGB Adjusted - rgb_color: " + str(rgb) + ", brightness: " + str(brightness) + ", transition: " + str(transition))
"""Set color of array of xy light."""
if self._attributes['lights_xy'] is not None and light in self._attributes['lights_xy']:
x_val, y_val = self.calc_xy()
if is_on(self.hass, light):
- turn_on(self.hass, light,
+ self.hass.services.call(LIGHT_DOMAIN, SERVICE_TURN_ON, dict(
xy_color=[x_val, y_val],
brightness=brightness,
transition=transition,
- white_value=brightness)
+ white_value=brightness))
_LOGGER.debug(light + " XY Adjusted - xy_color: [" + str(x_val) + ", " + srt(y_val) + "], brightness: " + str(brightness) + ", transition: " + str(transition) + ", white_value: " + str(white_value))
"""Set color of array of brightness light."""
if self._attributes['lights_brightness'] is not None and light in self._attributes['lights_brightness']:
if is_on(self.hass, light):
- turn_on(self.hass, light,
+ self.hass.services.call(LIGHT_DOMAIN, SERVICE_TURN_ON, dict(
brightness=brightness,
- transition=transition)
+ transition=transition))
_LOGGER.debug(light + " Brightness Adjusted - brightness: " + str(brightness) + ", transition: " + str(transition))
def light_state_changed(self, entity_id, from_state, to_state):