Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lights sometimes automatically switch back on after turning them off (CL enabled) #233

Open
glimberg opened this issue Jul 12, 2023 · 1 comment

Comments

@glimberg
Copy link

glimberg commented Jul 12, 2023

Seeing issues with 2023.7 and circadian_lighting 2.1.4 where lights will:

  • turn on after I've hit the switch to flip them off, or
  • transition to dim or off after flipping the switch on (usually after going to normal full brightness first)

I have 8 lights and one dimmer switch connected via Zigbee.

This only happens if the Circadian Lighting switch for the group is turned on.

HA Circadian Lighting * switch setup:

circadian_lighting:

switch:
  - platform: circadian_lighting
    name: CL-Living-Room
    lights_ct:
      - light.signify_netherlands_b_v_lcd006_light
      - light.signify_netherlands_b_v_lcd006_light_2
      - light.signify_netherlands_b_v_lcd006_light_3
      - light.signify_netherlands_b_v_lcd006_light_4
      - light.signify_netherlands_b_v_lcd006_light_5
      - light.signify_netherlands_b_v_lcd006_light_6
      - light.signify_netherlands_b_v_lcd006_light_7
      - light.signify_netherlands_b_v_lcl001_light

logger:
  logs:
    custom_components.circadian_lighting: debug
    custom_components.circadian_lighting.sensor: debug
    custom_components.circadian_lighting.switch: debug

Here are some logs of what's going on.

  1. Turn on all the lights (with circadian switch enabled)
2023-07-12 16:41:14.173 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcd006_light changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4716, color_temp: 212, hs_color: (26.792, 23.244), rgb_color: (255, 222, 195), xy_color: (0.384, 0.354).
2023-07-12 16:41:14.174 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcd006_light', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
2023-07-12 16:41:14.174 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcd006_light_2 changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4716, color_temp: 212, hs_color: (26.792, 23.244), rgb_color: (255, 222, 195), xy_color: (0.384, 0.354), off_brightness: None.
2023-07-12 16:41:14.175 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcd006_light_2', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
2023-07-12 16:41:14.176 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcd006_light_3 changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4716, color_temp: 212, hs_color: (26.792, 23.244), rgb_color: (255, 222, 195), xy_color: (0.384, 0.354), off_brightness: None.
2023-07-12 16:41:14.176 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcd006_light_3', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
2023-07-12 16:41:14.177 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcd006_light_4 changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4716, color_temp: 212, hs_color: (26.792, 23.244), rgb_color: (255, 222, 195), xy_color: (0.384, 0.354), off_brightness: None.
2023-07-12 16:41:14.177 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcd006_light_4', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
2023-07-12 16:41:14.178 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcd006_light_5 changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4694, color_temp: 213, hs_color: (26.782, 23.566), rgb_color: (255, 221, 194), xy_color: (0.385, 0.354), off_brightness: None.
2023-07-12 16:41:14.178 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcd006_light_5', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
2023-07-12 16:41:14.178 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcd006_light_6 changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4716, color_temp: 212, hs_color: (26.792, 23.244), rgb_color: (255, 222, 195), xy_color: (0.384, 0.354), off_brightness: None.
2023-07-12 16:41:14.180 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcd006_light_6', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
2023-07-12 16:41:14.180 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcl001_light changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4694, color_temp: 213, hs_color: (26.782, 23.566), rgb_color: (255, 221, 194), xy_color: (0.385, 0.354), off_brightness: None.
2023-07-12 16:41:14.181 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcl001_light', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
2023-07-12 16:41:14.181 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcd006_light_7 changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4716, color_temp: 212, hs_color: (26.792, 23.244), rgb_color: (255, 222, 195), xy_color: (0.384, 0.354), off_brightness: None.
2023-07-12 16:41:14.182 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcd006_light_7', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
  1. Wait a couple of seconds and flip the switch back off. All lights turn off initially, but lights 6 & 7 come back on automatically
2023-07-12 16:41:19.677 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcd006_light_6 changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4694, color_temp: 213, hs_color: (26.782, 23.566), rgb_color: (255, 221, 194), xy_color: (0.385, 0.354), off_brightness: None.
2023-07-12 16:41:19.677 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcd006_light_6', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
2023-07-12 16:41:19.716 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcl001_light changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4694, color_temp: 213, hs_color: (26.782, 23.566), rgb_color: (255, 221, 194), xy_color: (0.385, 0.354), off_brightness: None.
2023-07-12 16:41:19.717 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcl001_light', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}
2023-07-12 16:41:19.829 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Lights adjusting because light.signify_netherlands_b_v_lcd006_light_7 changed from off to on and these attributes changes: color_mode: color_temp, brightness: 254, color_temp_kelvin: 4694, color_temp: 213, hs_color: (26.782, 23.566), rgb_color: (255, 221, 194), xy_color: (0.385, 0.354), off_brightness: None.
2023-07-12 16:41:19.830 DEBUG (MainThread) [custom_components.circadian_lighting.switch] Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.signify_netherlands_b_v_lcd006_light_7', 'transition': 1.0, 'brightness': 254, 'color_temp': 213}

Sometimes it's a single light, sometimes it's multiple lights. And this only happens when Circadian Lighting is enabled.

@claytonjn
Copy link
Owner

Hi, thanks for including the logs as those explain exactly what's going on. Based on the logs in example 2, the state of lights 6 and 7 in Home Assistant switched from off to on, which triggered Circadian Lighting to adjust them. The first step is to probably take a look at the state history of those entities at the times in the log and confirm that Home Assistant shows the state changing from off to on.

Assuming that the Home Assistant state did change from off to on when the lights are off, then Circadian Lighting is working as expected - Circadian Lighting was told the lights are on and need to be adjusted. That said, I may be able to give some suggestions on how to work around the issue. To clarify, these are Hue lights but they are not connected to a Hue bridge, they're integrated with Home Assistant through a direct Zigbee integration...is that correrct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants