core: device_sun_light_trigger does not find lights

Home Assistant release with the issue:

0.85.1

Last working Home Assistant release (if known): unknown

Operating environment (Hass.io/Docker/Windows/etc.):

Docker/Ubuntu

Component/platform:

https://www.home-assistant.io/components/device_sun_light_trigger/ https://www.home-assistant.io/components/zha/

Description of problem: device_sun_light_trigger fails to setup because it does not find lights. In the logs you can see, zha component for lights is initialized after device_sun_light_trigger and therefore the light are not present at time device_sun_light_trigger starts.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

device_sun_light_trigger:
  device_group: group.sebastian
zha:
  usb_path: /dev/ttyUSB0
  database_path: /config/zigbee.db

Traceback (if applicable):

2019-01-16 22:05:39 INFO (MainThread) [homeassistant.setup] Setting up device_sun_light_trigger
2019-01-16 22:05:39 ERROR (MainThread) [homeassistant.components.device_sun_light_trigger] No lights found to turn on
2019-01-16 22:05:39 INFO (MainThread) [homeassistant.setup] Setup of domain device_sun_light_trigger took 0.0 seconds.
2019-01-16 22:05:39 ERROR (MainThread) [homeassistant.setup] Setup failed for device_sun_light_trigger: Component failed to initialize.
[some stuff not related]
2019-01-16 22:05:39 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.homematic
2019-01-16 22:05:39 INFO (MainThread) [homeassistant.loader] Loaded binary_sensor.zha from homeassistant.components.binary_sensor.zha
2019-01-16 22:05:39 INFO (MainThread) [homeassistant.loader] Loaded light.zha from homeassistant.components.light.zha
2019-01-16 22:05:39 INFO (MainThread) [homeassistant.loader] Loaded switch.zha from homeassistant.components.switch.zha
2019-01-16 22:05:39 INFO (MainThread) [homeassistant.loader] Loaded fan from homeassistant.components.fan
2019-01-16 22:05:39 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.zha
2019-01-16 22:05:39 INFO (MainThread) [homeassistant.components.light] Setting up light.zha
2019-01-16 22:05:39 INFO (MainThread) [homeassistant.components.switch] Setting up switch.zha

Additional information: Log times are not obvious, but the zha lines are logged after device_sun_light_trigger already failed

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

@speedmann can you give https://gist.github.com/Adminiuga/ed336b8c7deaf5046362a368c4f64e96 a try? Save it in your ha_config_directory/custom_components/ folder, comment out light_group: in trigger configuration and restart hass.