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.

Avoid sending brightness changes, when no changes are to be made

See original GitHub issue

This component works great, so thanks for that 😃

One minor change though - it seems brightness is being set, even when no change is made. F.ex, I will often see changes being pushed to lights going from 15% brightness to 15% brightness… HASS does not seem to check if the brightness has changed, before sending the command out…

Could Adaptive Lighting be updated to check if there’s a change, before calling light_on ? 😃

Thanks in advance.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

1reaction
sphanleycommented, Feb 4, 2021

That seems like good insight, but I feel like we’ve totally hijacked this original issue. Maybe a new issue should be opened for the dimming-brightening cycle issue?

1reaction
RouNNdeLcommented, Feb 4, 2021

I believe that both Shelly issues are caused by an event with brightness_pct: 0 being called (I don’t know where this comes from, it was in the logs). Here’s a script that replicates both the blinking and the transition canceling:

alias: Test
sequence:
  - service: light.turn_on
    data:
      brightness_pct: 0
    entity_id: light.bedroom
  - service: light.turn_on
    entity_id: light.bedroom
  - service: light.turn_on
    data:
      brightness_pct: 50
    entity_id: light.bedroom
mode: single

This exact sequence I found in the logs, all of this happens very quickly.

Interestingly enough removing the brightness_pct service call fixes the blinking problem, but removing the service all without any data fixes the transition problem.

Transition working:

alias: Test
sequence:
  - service: light.turn_on
    data:
      brightness_pct: 0
    entity_id: light.bedroom
  - service: light.turn_on
    data:
      brightness_pct: 50
    entity_id: light.bedroom
mode: single

No blinking:

alias: Test
sequence:
  - service: light.turn_on
    entity_id: light.bedroom
  - service: light.turn_on
    data:
      brightness_pct: 50
    entity_id: light.bedroom
mode: single
Read more comments on GitHub >

github_iconTop Results From Across the Web

Stop the screen brightness from dimming on your Galaxy phone
Navigate to Settings, and then tap Display. Tap the switch next to Adaptive brightness to turn the setting off.
Read more >
iPhone Brightness Keeps Changing: Why and How to Fix
2 ways to fix the brightness of your iPhone when it keeps changing ; Tap Accessibility. · Tap “Accessibility.” ; Tap Display &...
Read more >
Preventing a Windows PC from adjusting the screen's ...
Step 1: Turning off the option. This is the easy part. Search for “display” in the Start menu and select “Change brightness level”....
Read more >
Laptop Display Automatically Changing Brightness of Screen
Disabling Change brightness automatically when lighting changes in Windows Display settings may also resolve issues with automatic brightness.
Read more >
Screen Brightness dims completely when going fullscreen on ...
(Avoid ad links which intrude into editorial copy, especially avoid Restoro, ... Using the internet the brightness will not change in most cases....
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