Specific SPC risk badges only show when relevant, not when "no risk"
This commit is contained in:
@@ -3993,10 +3993,10 @@ views:
|
||||
entity: sensor.spc_outlook_day_1
|
||||
state_not: No Risk
|
||||
- type: custom:mushroom-template-badge
|
||||
content: '{{ state_attr(entity,''wind_probability'') }}'
|
||||
content: '{{ states(entity) }}'
|
||||
icon: mdi:weather-windy
|
||||
color: '{{ state_attr(entity,''wind_fill'') }}'
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_wind_risk_day_1
|
||||
label: SPC Wind Risk
|
||||
tap_action:
|
||||
action: more-info
|
||||
@@ -4008,22 +4008,19 @@ views:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_wind_risk_day_1
|
||||
state_not: unavailable
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_wind_risk_day_1
|
||||
state_not: unknown
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_wind_risk_day_1
|
||||
state_not: No Risk
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
state_not: General Thunderstorms Risk
|
||||
- type: custom:mushroom-template-badge
|
||||
content: '{{ state_attr(entity,''torn_probability'') }}'
|
||||
content: '{{ states(entity) }}'
|
||||
icon: mdi:weather-tornado
|
||||
color: '{{ state_attr(entity,''torn_fill'') }}'
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_tornado_risk_day_1
|
||||
label: SPC Tornado Risk
|
||||
tap_action:
|
||||
action: more-info
|
||||
@@ -4035,22 +4032,19 @@ views:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_tornado_risk_day_1
|
||||
state_not: unavailable
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_tornado_risk_day_1
|
||||
state_not: unknown
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_tornado_risk_day_1
|
||||
state_not: No Risk
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
state_not: General Thunderstorms Risk
|
||||
- type: custom:mushroom-template-badge
|
||||
content: '{{ state_attr(entity,''hail_probability'') }}'
|
||||
content: '{{ states(entity) }}'
|
||||
icon: mdi:weather-hail
|
||||
color: '{{ state_attr(entity,''hail_fill'') }}'
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_hail_risk_day_1
|
||||
label: SPC Hail Risk
|
||||
tap_action:
|
||||
action: more-info
|
||||
@@ -4062,17 +4056,14 @@ views:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_hail_risk_day_1
|
||||
state_not: unavailable
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_hail_risk_day_1
|
||||
state_not: unknown
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
entity: sensor.spc_hail_risk_day_1
|
||||
state_not: No Risk
|
||||
- condition: state
|
||||
entity: sensor.spc_outlook_day_1
|
||||
state_not: General Thunderstorms Risk
|
||||
- type: custom:mushroom-template-badge
|
||||
content: |-
|
||||
{% if is_state(entity,'on') %}
|
||||
|
||||
Reference in New Issue
Block a user