question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

adaptive_lighting.set_manual_control doesn't have the expected outcome

See original GitHub issue

I have a series of Philips Hue 4 button switches, and have traditionally used the “dim” button to set the lights to 1% brightness, no matter their current state. (eg if they’re off, they turn on with 1% brightness).

This works fine with adaptive lighting if the lights are already on, but if the lights are off, the act of turning them on triggers adaptive lighting. I’ve tried working around this by setting “adaptive_lighting.set_manual_control” to “true” in my automation before calling the “dim” scene but it doesn’t seem to work - the lights still come on at “full” brightness.

Example automation below.

- id: '1604357677300'
  alias: Kids Room Switch - Button 2 Hold
  description: ''
  trigger:
  - platform: event
    event_type: deconz_event
    event_data:
      id: kids_room_switch
      event: 2003
  condition: []
  action:
  - service: adaptive_lighting.set_manual_control
    data:
      manual_control: true
      lights: light.kids_room
    entity_id: switch.adaptive_lighting_home
  - scene: scene.kids_room_dim
  mode: single

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
bcuttercommented, Feb 13, 2021

If it´s not a bug, my proposal from https://github.com/basnijholt/adaptive-lighting/issues/89#issuecomment-778624792:

I still vote for adaptive lightning detecting if lights are turned on with custom settings and setting manual mode for those lights automatically (as it does when changes are detected when lights are on). That would save a lot of headache and many lines of YAML code.

Currently I´m testing to apply the manual_control in my automation, for the moment it seems to work:

      - choose:
          - conditions:
              - condition: device
                type: is_off
                device_id: [removed]
                entity_id: light.light_bulb
                domain: light
            sequence:
              - service: adaptive_lighting.set_manual_control
                data:
                  manual_control: true
                  lights: light.light_bulb
                entity_id: switch.adaptive_lighting
              - service: light.turn_on
                data:
                  brightness_pct: 100
                  transition: 1
                entity_id: light.light_bulb
          - conditions:
              - condition: device
                type: is_on
                device_id: [removed]
                entity_id: light.light_bulb
                domain: light
            sequence:
              - type: turn_off
                device_id: [revmoved]
                entity_id: light.light_bulb
                domain: light
              - service: adaptive_lighting.set_manual_control
                data:
                  manual_control: false
                  lights: light.light_bulb
                entity_id: switch.adaptive_lighting

Use-Case is in https://github.com/basnijholt/adaptive-lighting/issues/89#issue-804881318.

3reactions
regorascommented, Jan 30, 2021

I think this may be related, as it’s also related to manual control - if I set a light to manual control while it is off, when it is turned on, it automatically gets called to adaptive lighting, even though it was already marked as manually controlled. This seems counterintuitive to the readme where it says:

This mechanism works by listening to all light.turn_on calls that change the color or brightness and by noting that the component did not make the call.

If an automation or scene is calling the light (especially if calling it with custom values), that would suggest that it is manually controlled, right?

There doesn’t seem to be a good workaround for this in the case of the transition from a light being off to wanting it to go directly to a RGB color, for example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adaptive Lighting component for Home Assistant
If this happens and the light is already on, the light that was changed gets marked as “manually controlled” and the Adaptive Lighting...
Read more >
Adaptive-Lighting Integration: How do I re-enable the ... - Reddit
If adaptive lighting is still enabled, then all you should need to do is toggle the lights off and back on.
Read more >
Using Adaptive Cruise Control - Vehicles With
If you select this mode, adaptive cruise control operates with manual set speed input. The system does not set the vehicle speed to...
Read more >
What Is Ford Adaptive Cruise Control?
Drive to your desired speed. Press and release the SET button. Take your foot off the accelerator. The speed control system indicator light...
Read more >
Adaptive Lighting Control Technology for Greenhouses
Based on the findings of this trail, adaptive lighting control has potential to significantly reduce greenhouse supplemental lighting energy.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found