This update completely overhauls the layout and CSS code to more closely match the default lovelace interface.
While these changes are somewhat of a departure from the old default layout of the card, they should give a better out of the box experience to Home Assistant users.
Fortunately it's still possible to achieve many of the old layouts because of the way the card now uses the Flexbox CSS layout. This does take some more CSS coding, but at the same time should allow for more flexiblity.
Updates
- Added
positions
config option.
entities:
- entity: sensor.example
positions:
icon: outside
indicator: outside
title: outside
value: outside
minmax: outside
width: 60%
- entity: sensor.example
positions:
icon: inside
indicator: inside
title: inside
value: inside
minmax: inside
type: 'custom:bar-card'
title: Positions
- Added
stack
config option.
entities:
- sensor.example
- sensor.example
title: Stack
stack: horizontal
type: 'custom:bar-card'
- Added
entity_row
config option. This disables the background card for use inside and entity card.
entities:
- sensor.example
- entity: sensor.example
positions:
minmax: inside
entity_row: true
target: 50
type: 'custom:bar-card'
- entity: light.group_bedroom
name: Example
title: Entity Row
type: entities
entity: sensor.example
title: Default
type: 'custom:bar-card'
entity_row: true
- Added
name
config option.
entity: sensor.example
title: Name
type: 'custom:bar-card'
name: Bar Card
Breaking Changes
severity
object now usesfrom
andto
to define the value range.
entity: sensor.example
title: Severity
type: 'custom:bar-card'
severity:
- color: Red
from: 0
to: 25
- color: Orange
from: 26
to: 50
- color: Green
from: 51
to: 100
-
animation
config option converted to object. -
title
config option now adds a header to the card instead of defining the bar title. -
Removed
align
config option.
This has been removed in favor of card-mod. Using the new flexbox layout most of the old align options can be recreated using CSS.
- Removed
columns
config option. - Removed
icon_position
config option.
Has been added to positions
config option.
- Removed
saturation
config option.
No longer used since colors are now defined directly.
- Removed
show_minmax
config option.
Has been added to positions
config option.
- Removed
show_value
config option.
Has been added to positions
config option.
- Removed
attribute
config option.
This has been removed in favor of using a template sensor.
- Removed
charge_entity
config option. - Removed
delay
config option.
Has been added to animation
config option.
- Removed
speed
config option.
Has been added to animation
config option.
- Sensors can no longer be used as values for
min
,max
andtarget
config options.
This has been removed in favor of config-template-card.