So I thought I’d give card-modder a try to style a conditional card used for weather alerts when one is issued.
For my conditional card I have the state_not: ‘unknown’ set so for testing I change this to state: ‘unknown’
I figured out the styling, got it all set and changed back to state_not: ‘unknown’ but the card will not hide if the styling is in place.
Here is the card in it’s natural state:
- type: conditional
conditions:
- entity: sensor.ec_warning
state_not: ‘unknown’
card:
type: entities
entities:
- type: weblink
name: Weather Alert
icon: mdi:weather-lightning-rainy
url: Alerts - Environment Canada
and here it is with the card-modding in place:
- type: conditional conditions: - entity: sensor.ec_warning state_not: 'unknown' type: custom:card-modder style: background-color: rgba(251,13,13,1) border-radius: 5px --primary-color: white --paper-item-icon-color: white card: type: entities entities: - type: weblink name: Weather Alert icon: mdi:weather-lightning-rainy url: https://weather.gc.ca/warnings/report_e.html
No styling and everything works perfectly.
With styling it looks good but doesn’t hide.