Question: how to set colour based on light brightness
See original GitHub issueHi,
I have a button that I want to be “background” colour" when off and “yellow” when at 30% (which is the tap_action of this button).
…I know this isn’t a bug, but I am not sure where I can post a question like this.
Below is the best I have got and I know it is wrong. Can anyone advise"
- type: 'custom:button-card'
entity: light.hallway
color: auto-no-temperature
color_type: card
state:
- value: "off"
color: var(--paper-item-icon-color)
- value: {{state_attr('blight.hallway','brightness_pct')}}
operator: "="
value: 30
color: yellow
styles:
card:
- height: 100px
name: "Low"
tap_action:
action: call-service
service: light.turn_on
service_data:
entity_id: light.hallway
brightness_pct: 30
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Automatic smart light brightness and color based on the sun
I use Home Assistant to set my smart light brightness and colour temperature to different values based on the time of day and...
Read more >Adjust the brightness and color temperature on your iPhone or ...
Use the brightness control in Control Center, or open Display & Brightness in Settings.
Read more >Change text color based on brightness of the covered ...
Ignore the first set of functions because they're wrong, but the YIQ formula will help you determine whether or not to use a...
Read more >Will changing the color of the light source change the ...
The problem is that filament based lighting produce a continuous spectrum of wavelengths and must be filtered to produce specific colors.
Read more >How to adjust temperature, color, and brightness on your ...
Change color, temperature, and brightness · On the Color tab, tap and drag your finger across the color spectrum until you find your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Happy that it works. I’m going to close this, then 😃
agh, I posted on reddit, not here