using:
- type: conditional
conditions:
- entity: binary_sensor.meteoalarm_brabant
state: 'on'
card:
type: markdown
style: |
ha-card {
background: #103773;
color: white;
}
content: >
{% set alarm_color = state_attr('binary_sensor.meteoalarm_brabant','awareness_level').split(' ')[1].split(';')[0] %}
## <font color= {{alarm_color}}> {{state_attr('binary_sensor.meteoalarm_brabant','headline')}}</font>
<font color= {{alarm_color}}> **Severity:**</font> {{state_attr('binary_sensor.meteoalarm_brabant','severity')}}
<font color= {{alarm_color}}> **Description:**</font>
{{state_attr('binary_sensor.meteoalarm_brabant','description')}}
<font color= {{alarm_color}}> [{{state_attr('binary_sensor.meteoalarm_brabant','attribution')}}]({{state_attr('binary_sensor.meteoalarm_brabant','web')}})</font>
results in:
which as you can see makes the link at the bottom hard to read. I would have hoped my {{alarm_color}}
would set the color, but apparently that doesnt work on a hyperlink? Can this be done in another way?
thanks for having a look