so i have the boot strap buttons for my one dashboard…
i been using several years from example i found online… and it uses grey for offline blue for off and yellow for on
but id like to change it globally in the dashbard raw code… so Blue is offline, Red is Off and Green is On
now there is code in the raw that covers it but it doesnt seem to do anythhing… there is a
button_card_templates:
bootstrap_button_mini:
template: bootstrap_button
show_name: false
size: 39%
tap_action:
action: none
bootstrap_button_short:
template: bootstrap_button
show_icon: false
show_label: true
styles:
label:
- max-width: 90%
- font-size: 0.9rem
- color: var(--secondary-text-color)
- margin: 2.5px 0
card:
- padding-top: 0px
- padding-bottom: 0px
bootstrap_button_person:
template: bootstrap_button
show_entity_picture: true
color_type: card
size: 60%
state:
- operator: default
color: var( --ha-card-background, var(--card-background-color, red) )
bootstrap_button:
variables:
red_state: false
green_state: false
blue_state: false
percent: 0
show_name: true
show_state: true
show_icon: true
hold_action:
action: none
tap_action:
action: more-info
state:
- operator: template
value: '[[[ return variables.red_state ]]]'
color: var(--label-badge-red)
id: red_state
- operator: template
value: '[[[ return variables.green_state ]]]'
color: var(--label-badge-green)
id: green_state
- operator: template
value: '[[[ return variables.blue_state ]]]'
color: var(--label-badge-blue)
id: blue_state
styles:
name:
- margin-top: 8px
- color: var(--primary-text-color)
state:
- font-size: 0.9rem
- color: var(--secondary-text-color)
- padding: 3px 0 2px 0
- display: block
- width: 100%
- color: |
[[[
if (!variables.percent)
return 'var(--secondary-text-color)';
return 'var(--primary-text-color)';
]]]
- background: |
[[[
if (!variables.percent)
return;
return 'linear-gradient(to right, var(--accent-color, #f39c12), ' + variables.percent + '%, rgba(100,100,100,0.15) 0)';
]]]
extra_styles: |
:host, ha-card {
height: 100%
}
if i alter
bootstrap_button:
variables:
red_state: false
green_state: false
blue_state: false
percent: 0
then changes somewhat… but not the colors… also i not sure if this is a boot strap color or if its a button card color but i trying to change my boot strap and the buttons to change the color states and globablly cover all the buttons not have to repeat the code for each button
and this is one of the pops up i use that i want to to affect
- type: custom:button-card
template: bootstrap_button
class: col-xl-2 col-lg-2 col-md-3 col-sm-4 col-4
entity: group.building_sound
state_display: |
[[[
var count = states['sensor.building_sound_on'].state;
if (count == 1)
return '1 Device On';
else return count + ' Devices On';
]]]
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Building Sound
large: true
hide_header: false
content:
type: custom:bootstrap-grid-card
global_col_class: col-xl-2 col-lg-2 col-md-3 col-xl-4 col-4
cards:
- type: row
cards:
- entity: switch.stage_mixer_1
name: Stage Mixer
type: entity-button
icon: mdi:tune
- entity: switch.stage_amp_1
name: Stage Amp
type: entity-button
icon: mdi:amplifier
- entity: switch.building_door_1_speaker
name: Building Door Speaker 1
type: entity-button
icon: mdi:speaker
- entity: script.turn_on_sound_equipment_and_am640
name: Turn On Equip & 640
type: entity-button
icon: mdi:speaker
tap_action:
action: perform-action
perform_action: script.turn_on
target:
entity_id: script.turn_on_sound_equipment_and_am640
- entity: script.turn_off_sound_equipment_and_am640
name: Turn Off Equip & 640
type: entity-button
icon: mdi:speaker
tap_action:
action: perform-action
perform_action: script.turn_on
target:
entity_id: script.turn_off_sound_equipment_and_am640


