here is the solution
- type: horizontal-stack
title: Prévisions de pluie
cards:
- color_type: card
entity: sensor.limoges_next_rain
name: "0"
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['0 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['0 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['0 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 05
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['5 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['5 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['5 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 10
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['10 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['10 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['10 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 15
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['15 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['15 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['15 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 20
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['20 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['20 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['20 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 25
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['25 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['25 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['25 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 30
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['30 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['30 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['30 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 35
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['35 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['35 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['35 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 40
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['40 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['40 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['40 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 45
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['45 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['45 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['45 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 50
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['50 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['50 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['50 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'
- color_type: card
entity: sensor.limoges_next_rain
name: 55
show_icon: false
show_state: false
state:
- color: 'rgb(204, 217, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['55 min'] == 'Pluie faible')
]]]
- color: 'rgb(128, 159, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['55 min'] == 'Pluie modérée')
]]]
- color: 'rgb(51, 102, 255)'
operator: template
value: |
[[[
return states['sensor.limoges_next_rain'].attributes
&& (states['sensor.limoges_next_rain'].attributes['1_hour_forecast']['55 min'] == 'Pluie forte')
]]]
- color: 'rgb(255, 255, 255)'
operator: default
styles:
card:
- height: 50px
type: 'custom:button-card'