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.

May I suggest a different default color schema and behaviour?

See original GitHub issue

Hi there,

I know colors and thresholds can be customized, but I would still like to suggest to have the default color schema to be more “brillant”

For intance, this is what I did create on my own: image

This is the card: image

If interested, those are the color thresholds I used:

                    --paper-item-icon-color:
                      {% if is_state(config.entity, 'unknown') %}
                        rgb(128, 128, 128);
                      {% elif states(config.entity)|int > 100 %}
                        rgb(128, 128, 128);
                      {% elif states(config.entity)|int >= 80 %}
                        rgb(0, 153, 51);
                      {% elif states(config.entity)|int >= 60 %}
                        rgb(0, 153, 0);
                      {% elif states(config.entity)|int >= 40 %}
                        rgb(255, 128, 0);
                      {% elif states(config.entity)|int >= 20 %}
                        rgb(204, 102, 0);
                      {% elif states(config.entity)|int >= 0 %}
                        rgb(153, 0, 0);
                      {% else %}
                        rgb(128, 128, 128);
                      {% endif %}
                  }```

Also, Where is the icon coming from? I thought it was from the sensor itself but it doesn't look like (see the Motorola phone differences), it should so that the "charging" state is kept.

Also, not sure it's easy to do or not, but maybe have an option to define "charging_entity" where you can define the binary_sensor that defines if the battery is charging on not in order to have the right icon would be nice, maybe with a second line saying "Charging" as per my current setup.

Of course, those are just suggestions :)

Thanks
Andrea

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maxwroccommented, May 2, 2020

The unknown is always shown as a default icon color. If you want to have the override for this please create a separate issue. I’ll think about it

1reaction
maxwroccommented, Apr 29, 2020

Just added support for charging state. It will be available in v1.1.0

I’ll open separate item for secornary_info support as I want to make it more generic - not only for indicating charging

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improved dark mode default styling with the color-scheme ...
The color-scheme property defined therein allows an element to indicate which color schemes it is comfortable being rendered with. These values ...
Read more >
color-scheme - CSS: Cascading Style Sheets - MDN Web Docs
Indicates that the element isn't aware of any color schemes, and so should be rendered using the browser's default color scheme. light.
Read more >
How to tell browsers that your site supports color-schemes
A detailed look at the color-scheme property that allows developers to define which color chemes are defined in a website.
Read more >
How to Choose the Right Color Schemes - Artists Network
Although it is enjoyable to experiment with color schemes by choosing colors randomly based on our individual preferences, there are a number of...
Read more >
Color Theory And Color Palettes — A Complete Guide [2023]
Complementary color palettes are comprised of colors that are placed in front of each other on the color wheel. While the name may...
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