Bonjour,
Sur la base de la discussion et de la carte partagée par @LeLapinFou (Pollens custom component sensor - #226 par LeLapinFou), je suis en train d’essayer de me faire ma propre carte et qui pour le moment ressemble à cela:
J’aimerai pouvoir utiliser les 2/3 de la colonne pour la jauge et le reste pour les boutons (button card). Quelle serait la meilleure approche pour réaliser cela ?
Merci !!!
The carte
type: horizontal-stack
cards:
- type: gauge
entity: sensor.pollens_91_risklevel
needle: true
min: -0.5
max: 3.5
segments:
- from: -0.5
color: '#43a047'
- from: 0.5
color: '#63d087'
- from: 1.5
color: '#ff781f'
- from: 2.5
color: '#ff2200'
name: Alerte niveau Pollens
- square: false
type: grid
columns: 1
cards:
- type: custom:button-card
custom_fields:
numitems:
card:
type: custom:button-card
name: nb
show_icon: false
show_state: true
show_name: true
entity: sensor.nombre_pollens_herbe_sup_0
styles:
name:
- font-size: 0.5em
- color: rgba(178,190,181,0.6)
state:
- font-size: 0.5em
- color: rgba(255,255,255,0.6)
tap_action:
action: none
hold_action:
action: none
styles:
card:
- background: none
- border-radius: 0
custom_fields:
numitems:
- position: absolute
- left: 65%
- top: 10%
entity: sensor.nombre_pollens_herbe_on
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: false
state:
- value: 0
entity_picture: /local/images/pollens/pollen_grass_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_grass_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_grass_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_grass_04.png
size: 35px
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
deviceID:
- this
- dashboard
data:
title: Pollen Plante
content:
type: grid
columns: 1
square: false
cards:
- type: grid
columns: 4
square: false
cards:
- type: custom:button-card
entity: sensor.pollens_91_ambroisies
name: ambroisies
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_weed_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_weed_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_weed_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_weed_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_oseille
name: oseille
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_weed_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_weed_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_weed_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_weed_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_urticacees
name: urticacees
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_weed_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_weed_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_weed_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_weed_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_cupressacees
name: cupressacees
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_weed_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_weed_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_weed_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_weed_04.png
tap_action:
action: none
hold_action:
action: none
- type: custom:button-card
custom_fields:
numitems:
card:
type: custom:button-card
name: nb
show_icon: false
show_state: true
show_name: true
entity: sensor.nombre_pollens_plante_sup_0
styles:
name:
- font-size: 0.5em
- color: rgba(178,190,181,0.6)
state:
- font-size: 0.5em
- color: rgba(255,255,255,0.6)
tap_action:
action: none
hold_action:
action: none
styles:
card:
- background: none
- border-radius: 0
custom_fields:
numitems:
- position: absolute
- left: 65%
- top: 10%
entity: sensor.nombre_pollens_plante_on
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: false
state:
- value: 0
entity_picture: /local/images/pollens/pollen_weed_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_weed_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_weed_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_weed_04.png
size: 35px
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
deviceID:
- this
- dashboard
data:
title: Pollen Herbe
content:
type: grid
columns: 1
square: false
cards:
- type: grid
columns: 3
square: false
cards:
- type: custom:button-card
entity: sensor.pollens_91_armoise
name: armoise
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_grass_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_grass_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_grass_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_grass_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_graminees
name: graminees
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_grass_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_grass_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_grass_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_grass_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_plantain
name: plantain
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_grass_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_grass_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_grass_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_grass_04.png
tap_action:
action: none
hold_action:
action: none
- type: custom:button-card
custom_fields:
numitems:
card:
type: custom:button-card
name: nb
show_icon: false
show_state: true
show_name: true
entity: sensor.nombre_pollens_arbres_sup_0
styles:
name:
- font-size: 0.5em
- color: rgba(178,190,181,0.6)
state:
- font-size: 0.5em
- color: rgba(255,255,255,0.6)
tap_action:
action: none
hold_action:
action: none
styles:
card:
- background: none
- border-radius: 0
custom_fields:
numitems:
- position: absolute
- left: 65%
- top: 10%
entity: sensor.nombre_pollens_arbre_on
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: false
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
size: 35px
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
deviceID:
- this
- dashboard
data:
title: Pollen Arbre
content:
type: grid
columns: 1
square: false
cards:
- type: grid
columns: 3
square: false
cards:
- type: custom:button-card
entity: sensor.pollens_91_bouleau
name: bouleau
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_platane
name: platane
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_tilleul
name: tilleul
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_peuplier
name: peuplier
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_noisetier
name: noisetier
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_olivier
name: olivier
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_chataignier
name: chataignier
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_frene
name: frene
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_chene
name: chene
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_aulne
name: aulne
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_saule
name: saule
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
- type: custom:button-card
entity: sensor.pollens_91_charme
name: charme
show_entity_picture: true
show_icon: false
show_label: false
show_state: false
show_name: true
state:
- value: 0
entity_picture: /local/images/pollens/pollen_tree_01.png
- value: 1
entity_picture: /local/images/pollens/pollen_tree_02.png
- value: 2
entity_picture: /local/images/pollens/pollen_tree_03.png
- value: 3
entity_picture: /local/images/pollens/pollen_tree_04.png
tap_action:
action: none
hold_action:
action: none