FR:
Comme je lâai dĂ©jĂ dit : Merci pour le thĂšme et le partage
Voici une modeste contribution (surtout si câĂ©tait dĂ©jĂ prĂ©sent dans le code )
Lâajout par rapport au modĂšle (template) dĂ©jĂ fournis, est lâutilisation de la clĂ© id
afin de combiner plusieurs modĂšle (template)
EN :
As I said before: Thanks for the theme and sharing
My small contribution (especially if it was already present in the code )
I have added to the template already provided, the id
key to merge several template: +1:
Porte / Door :
#Carte/Card
type: custom:button-card
entity: binary_sensor.porte_cuisine
template:
- icon_info_bg
- ouverture_porte
name: Cuisine
#ModĂšle/Template
button_card_templates:
ouverture_porte:
template:
- rouge_on
- vert_off
state:
- icon: mdi:door-open
label: Porte Ouverte
id: rouge_on
value: 'on'
- icon: mdi:door-closed
label: Porte Fermée
id: vert_off
value: 'off'
FenĂȘtre/Window
#Carte/Card
type: custom:button-card
entity: binary_sensor.fenetre_bureau
template:
- icon_info_bg
- ouverture_fenetre
name: Bureau
#ModĂšle/Template
button_card_templates:
ouverture_fenetre:
template:
- rouge_on
- vert_off
state:
- icon: mdi:window-open-variant
label: FenĂȘtre Ouverte
id: rouge_on
value: 'on'
- icon: mdi:window-closed-variant
label: FenĂȘtre FermĂ©e
id: vert_off
value: 'off'
ModĂšles inclus dans les modĂšles / Templates includes in template (inception )
button_card_templates:
vert_off:
state:
- id: vert_off
styles:
icon:
- color: rgba(var(--couleur-vert),1)
img_cell:
- background-color: rgba(var(--couleur-vert), 0.2)
value: 'off'
vert_on:
state:
- id: vert_on
styles:
icon:
- color: rgba(var(--couleur-vert),1)
img_cell:
- background-color: rgba(var(--couleur-vert), 0.2)
value: 'on'
rouge_on:
state:
- id: rouge_on
styles:
icon:
- color: rgba(var(--couleur-rouge),1)
img_cell:
- background-color: rgba(var(--couleur-rouge), 0.2)
value: 'on'
rouge_off:
state:
- id: rouge_off
styles:
icon:
- color: rgba(var(--couleur-rouge),1)
img_cell:
- background-color: rgba(var(--couleur-rouge), 0.2)
value: 'off'
Edit :
Merci beaucoup, trĂšs jolie
Thank you very much it makes it really pretty: