I need help with the code.
I added a glance code and added column_width. Unfortunately, it does not display the code of column_width.
My code:
- type: vertical-stack
cards:
- type: custom:card-modder
style:
text-align: center
--glance-column-width: 16%
card:
type: glance
entities:
- type: entity-button
entity: script.back
icon: mdi:backup-restore
name: Back
tap_action:
action: toggle
- type: entity-button
entity: script.mute
icon: mdi:volume-mute
name: Mute
tap_action:
action: toggle
- type: entity-button
entity: script.volume_down
icon: mdi:volume-minus
name: V - Down
tap_action:
action: toggle
- type: entity-button
entity: script.volume_up
icon: mdi:volume-plus
name: V - UP
tap_action:
action: toggle
- type: entity-button
entity: script.channel_down
icon: mdi:chevron-down
name: Down
tap_action:
action: toggle
- type: entity-button
entity: script.channel_up
icon: mdi:chevron-up
name: Up
tap_action:
action: toggle
- type: horizontal-stack
cards:
- type: vertical-stack
cards:
- type: glance
title:
column_width: calc(100% / 3)
show_name: false
show_state: false
entities:
- type: entity-button
entity: script.up
icon: mdi:arrow-up-bold-circle
name: up
tap_action:
action: toggle
- type: entity-button
entity: script.left
icon: mdi:arrow-left-bold-circle
name: left
tap_action:
action: toggle
- type: entity-button
entity: script.ok
icon: mdi:pokeball
name: ok
tap_action:
action: toggle
- type: entity-button
entity: script.right
icon: mdi:arrow-right-bold-circle
name: right
tap_action:
action: toggle
- type: entity-button
entity: script.down
icon: mdi:arrow-down-bold-circle
name: down
tap_action:
action: toggle
- type: entity-button
entity: script.back
icon: mdi:keyboard-backspace
name: back
tap_action:
action: toggle
- type: entity-button
entity: script.settings
icon: mdi:settings
name: settings
tap_action:
action: toggle
- type: entity-button
entity: script.tv_on
icon: mdi:power
name: on
tap_action:
action: toggle
- type: vertical-stack
cards:
- type: glance
title:
column_width: calc(100% / 3)
show_name: false
show_state: false
entities:
- type: entity-button
entity: script.channel_1
icon: mdi:numeric-1-box-outline
name: channel 1
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_1
- type: entity-button
entity: script.channel_2
icon: mdi:numeric-2-box-outline
name: channel 2
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_2
- type: entity-button
entity: script.channel_3
icon: mdi:numeric-3-box-outline
name: channel 3
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_3
- type: entity-button
entity: script.channel_4
icon: mdi:numeric-4-box-outline
name: channel 4
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_4
- type: entity-button
entity: script.channel_5
icon: mdi:numeric-5-box-outline
name: channel 5
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_5
- type: entity-button
entity: script.channel_6
icon: mdi:numeric-6-box-outline
name: channel 6
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_6
- type: entity-button
entity: script.channel_7
icon: mdi:numeric-7-box-outline
name: channel 7
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_7
- type: entity-button
entity: script.channel_8
icon: mdi:numeric-8-box-outline
name: channel 8
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_8
- type: entity-button
entity: script.channel_9
icon: mdi:numeric-9-box-outline
name: channel 5
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_9
- type: entity-button
entity: script.channel_0
icon: mdi:numeric-0-box-outline
name: Kanaal 0
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.channel_0
And this is the result:
In practice it should be this way - I found a picture on the net