Dim lights based on the sun's elevation

I think you might be correct, looks like I copied the wrong part of the log, there’s two rough duplicates and the other one doesn’t have the skip: true! Here’s more or less the entire context, check for the same timestamp as above:

2021-04-26 20:32:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 3.43 (8.5, -18)

 last elevation: 3.71

 new brightness: 189

 last brightness: 191

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 193}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 3.71, azimuth: 288.41)

 to:   (elevation: 3.43, azimuth: 288.8)

2021-04-26 20:32:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 3.43 (8.5, -18)

 last elevation: 3.43

 new brightness: 189

 last brightness: 189

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 193}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 189, 'transition': 0}}

2021-04-26 20:34:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 3.16 (8.5, -18)

 last elevation: 3.43

 new brightness: 187

 last brightness: 189

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 189}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 3.43, azimuth: 288.8)

 to:   (elevation: 3.16, azimuth: 289.19)

2021-04-26 20:34:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 3.16 (8.5, -18)

 last elevation: 3.16

 new brightness: 187

 last brightness: 187

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 189}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 187, 'transition': 0}}

2021-04-26 20:36:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 2.88 (8.5, -18)

 last elevation: 3.16

 new brightness: 185

 last brightness: 187

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 187}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 3.16, azimuth: 289.19)

 to:   (elevation: 2.88, azimuth: 289.58)

2021-04-26 20:36:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 2.88 (8.5, -18)

 last elevation: 2.88

 new brightness: 185

 last brightness: 185

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 187}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 185, 'transition': 0}}

2021-04-26 20:37:24 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 2.88 (8.5, -18)

 last elevation: 2.88

 new brightness: 185

 last brightness: 185

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 185}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: light.woonkamer_led_vide

 service_data_length: 2

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': 'light.woonkamer_led_vide', 'brightness_pct': 38}}

2021-04-26 20:38:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 2.61 (8.5, -18)

 last elevation: 2.88

 new brightness: 183

 last brightness: 185

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 97}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 2.88, azimuth: 289.58)

 to:   (elevation: 2.61, azimuth: 289.97)

2021-04-26 20:38:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 2.61 (8.5, -18)

 last elevation: 2.61

 new brightness: 183

 last brightness: 183

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 97}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 183, 'transition': 0}}

2021-04-26 20:40:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 2.34 (8.5, -18)

 last elevation: 2.61

 new brightness: 181

 last brightness: 183

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 183}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 2.61, azimuth: 289.97)

 to:   (elevation: 2.34, azimuth: 290.36)

2021-04-26 20:40:48 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 2.34 (8.5, -18)

 last elevation: 2.34

 new brightness: 181

 last brightness: 181

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 183}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 181, 'transition': 0}}

2021-04-26 20:42:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 2.07 (8.5, -18)

 last elevation: 2.34

 new brightness: 179

 last brightness: 181

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 181}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 2.34, azimuth: 290.36)

 to:   (elevation: 2.07, azimuth: 290.75)

2021-04-26 20:42:48 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 2.07 (8.5, -18)

 last elevation: 2.07

 new brightness: 179

 last brightness: 179

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 181}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 179, 'transition': 0}}

2021-04-26 20:44:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 1.8 (8.5, -18)

 last elevation: 2.07

 new brightness: 177

 last brightness: 179

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 179}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 2.07, azimuth: 290.75)

 to:   (elevation: 1.8, azimuth: 291.14)

2021-04-26 20:44:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 1.8 (8.5, -18)

 last elevation: 1.8

 new brightness: 177

 last brightness: 177

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 179}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 177, 'transition': 0}}

2021-04-26 20:46:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 1.54 (8.5, -18)

 last elevation: 1.8

 new brightness: 175

 last brightness: 177

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 177}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 1.8, azimuth: 291.14)

 to:   (elevation: 1.54, azimuth: 291.54)

2021-04-26 20:46:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 1.54 (8.5, -18)

 last elevation: 1.54

 new brightness: 175

 last brightness: 175

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 177}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 175, 'transition': 0}}

2021-04-26 20:48:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 1.28 (8.5, -18)

 last elevation: 1.54

 new brightness: 173

 last brightness: 175

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 175}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 1.54, azimuth: 291.54)

 to:   (elevation: 1.28, azimuth: 291.93)

2021-04-26 20:48:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 1.28 (8.5, -18)

 last elevation: 1.28

 new brightness: 173

 last brightness: 173

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 175}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 173, 'transition': 0}}

2021-04-26 20:50:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 1.03 (8.5, -18)

 last elevation: 1.28

 new brightness: 171

 last brightness: 173

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 173}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 1.28, azimuth: 291.93)

 to:   (elevation: 1.03, azimuth: 292.32)

2021-04-26 20:50:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 1.03 (8.5, -18)

 last elevation: 1.03

 new brightness: 171

 last brightness: 171

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 173}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 171, 'transition': 0}}

2021-04-26 20:52:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 0.78 (8.5, -18)

 last elevation: 1.03

 new brightness: 169

 last brightness: 171

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 171}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 1.03, azimuth: 292.32)

 to:   (elevation: 0.78, azimuth: 292.72)

2021-04-26 20:52:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 0.78 (8.5, -18)

 last elevation: 0.78

 new brightness: 169

 last brightness: 169

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 171}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 169, 'transition': 0}}

2021-04-26 20:54:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 0.54 (8.5, -18)

 last elevation: 0.78

 new brightness: 167

 last brightness: 169

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 169}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 0.78, azimuth: 292.72)

 to:   (elevation: 0.54, azimuth: 293.11)

2021-04-26 20:54:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 0.54 (8.5, -18)

 last elevation: 0.54

 new brightness: 167

 last brightness: 167

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 169}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 167, 'transition': 0}}

2021-04-26 20:56:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 0.3 (8.5, -18)

 last elevation: 0.54

 new brightness: 165

 last brightness: 167

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 167}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 0.54, azimuth: 293.11)

 to:   (elevation: 0.3, azimuth: 293.51)

2021-04-26 20:56:47 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 0.3 (8.5, -18)

 last elevation: 0.3

 new brightness: 165

 last brightness: 165

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 167}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 165, 'transition': 0}}

2021-04-26 20:58:28 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: False

 allowance_value: 0.0

 affected_entities: ['light.woonkamer_led_vide']


 elevation: 0.1 (8.5, -18)

 last elevation: 0.3

 new brightness: 164

 last brightness: 165

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 165}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: ['light.woonkamer_led_vide']

 

 turn_off_entities: []

 

 Triggered by: state

 from: (elevation: 0.3, azimuth: 293.51)

 to:   (elevation: 0.1, azimuth: 293.84)

2021-04-26 20:58:28 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:

 skip_event: True

 allowance_value: 0.0

 affected_entities: []


 elevation: 0.1 (8.5, -18)

 last elevation: 0.1

 new brightness: 164

 last brightness: 164

 

 current_states: [{'entity_id': 'light.woonkamer_led_vide', 'state': 'on', 'brightness': 165}]

 

 force_turn_on: True

 force_turn_off: False

 

 entities: ['light.woonkamer_led_vide']

 

 turn_on_entities: []

 

 dim_entities: []

 

 turn_off_entities: []

 

 Triggered by: event

  entity_id: ['light.woonkamer_led_vide']

 service_data_length: 3

 complete event data: {'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': ['light.woonkamer_led_vide'], 'brightness': 164, 'transition': 0}}

I’m running this on my own server. Which has a Pentium(R) CPU G4560 with 8GB of memory and an SSD (those are the most important bits I think)

Hi @mukens, in a search I bumped on this blueprint and I have a few questions:

  1. can this be used to only switch on lights at sunset and increase brightness (seems to be reversed brightness), so doing nothing at sunrise?
  2. how could I use a condition, so not run this automatically every evening?

TIA

Yes, you have two independent check boxes. One for switching on the light at sunset and another to switch off the light at sunrise.

There is also a checkbox to reverse the brightness, so it goes from dim to bright when the sun sets.

There are currently no such feature implemented, but that could be added to the blueprint if desired. I’m thinking of a text field that contain a template you can write to decide if it should be run or not.

1 Like

Any idea why this would trigger this automation @mukens ? Only state of sun is supposed to trigger it I tought?

Yes, in order to know when state changes on any of the lights specified, the only way to trigger the automation properly (at least when blueprints were introduced) was to listen to events and more specifically call_service for turn on of the light.

The reason at the time was that if you specified multiple lights, you could not enter the target input as the trigger for some reason.

But why is below automation triggering “your” automation? Any ideas?

It is triggered for all service calls regarding lights (if i remember correctly), but it doesn’t update anything unless the call was for one of the lights specified in the automation.

Also please note that only entities can be selected. If you select areas or devices, the automation will not work.

it would be good if you could set a condition based on the presence of people (using the person entity)

I’ll look into having a custom template input for this.

Hello and thank you for a awesome blueprint, it is my most appreciated one.

However, I have encounter a issue: brightness doesn’t update automatically anymore. I don’t know for how long this have been since the automation haven’t been active during summer, but I notice the other day when the dark is approaching.
The lights are turning on and off as usual according to elevation, I can also see in the log that the updates are coming but without actions. “Run actions” doesn’t trigger the updates either. The lights are only adjusting to correct brightness if I turn off and on the lights.
Change allowance is at 100%, I’m using latest version and don’t have any other automations that triggers the brightness.

Any ideas why this happens?

That’s weird. Seems to work just fine here…
Have you changed anything, new hardware for instance?
Can you see anything in the log file?

Yeah I also find it weird.
Nothing new on hardware.
I tried to get a log from based upon earlier comments made in this thread, but I couldn’t find where the logs are located? Maybe a guide would be helpful to read out logs would be appreciated, if more people than me want to debug this automation.

It’s in the standard home assistant log located in /config and also available via the web GUI. Unfortunately I’m flooded with work atm and don’t have much time to help out. Maybe some other nice user in here could help out finding the logs?

Hello again, for people like me who have not looked into logs before check for keyword “debug” in file editor → config → home-assistant.log

This is from a usual update from the automation, as you can see the allowance is set to 100%:

2021-10-05 21:26:10 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:
skip_event: False
allowance_value: 254.0
affected_entities: [‘light.ikea_e27_light’]

elevation: -22.82 (11, -12)
last elevation: -20.44
new brightness: 50
last brightness: 50

current_states: [{‘entity_id’: ‘light.ikea_e27_light’, ‘state’: ‘on’, ‘brightness’: 33}]

force_turn_on: False
force_turn_off: False

entities: [‘light.ikea_e27_light’]

turn_on_entities: []

dim_entities: []

turn_off_entities: []

Triggered by: state
from: (elevation: -20.44, azimuth: 294.63)
to: (elevation: -22.82, azimuth: 299.34)

This is from when the light is turned from off to on, starting at brightness 38:

2021-10-05 21:08:11 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:
skip_event: False
allowance_value: 254.0
affected_entities: [‘light.ikea_e27_light’]

elevation: -20.44 (11, -12)
last elevation: -20.44
new brightness: 50
last brightness: 50

current_states: [{‘entity_id’: ‘light.ikea_e27_light’, ‘state’: ‘off’, ‘brightness’: None}]

force_turn_on: False
force_turn_off: False

entities: [‘light.ikea_e27_light’]

turn_on_entities: []

dim_entities: [‘light.ikea_e27_light’]

turn_off_entities: []

Triggered by: event
entity_id: light.ikea_e27_light
service_data_length: 1
complete event data: {‘domain’: ‘light’, ‘service’: ‘turn_on’, ‘service_data’: {‘entity_id’: ‘light.ikea_e27_light’}}

2021-10-05 21:08:12 DEBUG (MainThread) [homeassistant.components.blueprint.dim_lights_based_on_sun_elevation] DEBUG:
skip_event: True
allowance_value: 254.0
affected_entities: []

elevation: -20.44 (11, -12)
last elevation: -20.44
new brightness: 50
last brightness: 50

current_states: [{‘entity_id’: ‘light.ikea_e27_light’, ‘state’: ‘on’, ‘brightness’: 38}]

force_turn_on: False
force_turn_off: False

entities: [‘light.ikea_e27_light’]

turn_on_entities: []

dim_entities: []

turn_off_entities: []

Triggered by: event
entity_id: [‘light.ikea_e27_light’]
service_data_length: 3
complete event data: {‘domain’: ‘light’, ‘service’: ‘turn_on’, ‘service_data’: {‘entity_id’: [‘light.ikea_e27_light’], ‘brightness’: 50, ‘transition’: 0}}

Could it be related to the skip_event flag, I don’t know what is does? For some reason the entity is not put into the dim_entities array. This goes for both IKEA E27 and GU10 bulbs if its relevant.

Hello to all! Glad to join this great community…I must say that I am a newbie… Got my Raspberry 2 weeks ago…
I installed this blueprint, and it seems the work well… But I have an issue…
It works perfectly when I turn the lamp on through HA…
But then I turn it on through Smart Life or Alexa, it doesn’t work… Seems it doesn’t start the full process…
Any clue on what I should do to have it work also when turning off by Smart Life and Alexa?
Thanks in advance for your support

@mukens Hey thanks for the awesome contribution this blueprint is great! I just had one issue, I noticed that it is activated by a call_service and was wondering if their was any way to trigger it by a state_changed instead. Ex when my lights are turned on by a motion sensor they work great and dim like they should but when they are turned on by a Kasa dimmer switch the automation does not trigger due to the lights not being turned on by a call_service.
Thanks for your time!

I remember there was some problem with state change when I created it, but can’t remember what at the moment.

Unfortunately I don’t have the time right now to look into it, buy I’d be happy to receive pull requests from anyone willing to add that functionality.

I just ended up finding a work around, I used a node red device trigger to activate a call_service. so the switch turns on then home assistant registers the change state and fires the lights to turn on again which activates the automation. Thanks!

I just want to make sure I properly understand the way elevation works. So the solar elevation angle is NOT the same as degrees above horizon…

Here’s a calculator example

per my values, roughly placed in the upper left USA, using your default values, but turning on light at sunset and off at sunrise, sun should set at 4:20pm which would mean the elevation would be roughly -62.75…

|16:00|-61.34|331.22|
|16:15|-62.42|338.26|
|16:30|-63.20|345.71|

then this automation by default should start dimming the light from 100% when elevation is at 0, it seems like the 0 elevation is to clear a threshold, 4:20pm the elevation is at -62 it should start dimming right away and be completely dim when elevation is at -30, which in this case on that specific date is 9:35pm or so.

|21:15|-32.89|86.53|
|21:30|-30.37|89.36|
|21:45|-27.85|92.12|

Then the default value is to start brightening when elevation is -8, which would be at 11:35pm or so.

|23:30|-10.69|110.50|
|23:45|-8.36|113.12|
|24:00|-6.06|115.77|

it should be max brightness when elevation is 6 which roughly is after 1:17am Or so.

|01:15|4.96|129.60|
|01:30|6.82|132.54|
|01:45|8.61|135.55|

the lights should turn off completely at sunrise, which in my case is 7:36am, roughly 12.90 or something elevation

|07:30|12.85|216.13|
|07:45|11.31|219.33|
|08:00|9.68|222.45|

BUT all of this is ONLY possible if you’ve not messed around with turning the lights on or off at any point…

HOWEVER if you wanted to “ignore” the brightening again feature you could set your elevation from -60 to -55, at least in my part of the world.

Also sorry for being so dense… I don’t remember this at all from school.

Is this still a limitation? I use KNX and it doesn’t trigger the service when putting on the lights. The state change is registered correctly, but I tried changing that in the blueprint, but then it doesn’t do anything anymore.