Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create --custom-bar-card-color variable #17

Merged
merged 2 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Bar Card is a customizable animated card for the Home Assistant Lovelace front-e
| show_minmax | boolean | false | Shows the minimum and maximum value when set to `true`.
| decimal | number | false | The amount of decimals to be displayed for the value. Shows full number when set to `false`.
| unit_of_measurement | string | none | Unit of measurement to be displayed.
| color | string | var(--primary-color) | Color of the bar, can be any valid CSS color value or variable.
| color | string | var(--custom-bar-card-color, var(--primary-color)) | Color of the bar, can be any valid CSS color value or variable. Custom themes should set `custom-bar-card-color` if `primary-color` is not a good default
| title | string | friendly_name | Title displayed next to the bar.
| title_position | string | left | Position of the title. `left`, `right`, `top`, `bottom`, `inside`, `'off'`
| icon | string | icon | Icon to be displayed. If no icon is defined entity icon attribute will be used.
Expand Down
2 changes: 1 addition & 1 deletion bar-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BarCard extends HTMLElement {
if (!config.max) config.max = 100
if (!config.padding) config.padding = '4px'
if (!config.align) config.align = 'center'
if (!config.color) config.color = 'var(--primary-color)'
if (!config.color) config.color = 'var(--custom-bar-card-color, var(--primary-color))'
if (!config.tap_action) config.tap_action = 'info'
if (!config.show_value) config.show_value = true
if (!config.limit_value) config.limit_value = false
Expand Down