Add lightning and rain notifications to top of mobile dashboard

#1
This commit is contained in:
2024-08-06 15:51:40 -04:00
parent 8e02116c8b
commit 73007838d6

View File

@ -316,6 +316,82 @@ views:
- condition: state
entity: sensor.weatheralerts_alerts_are_active
state: 'Yes'
- type: custom:bubble-card
card_type: button
button_type: state
entity: binary_sensor.lightning_warning
name: Lightning is in the area!
show_state: false
double_tap_action:
action: more-info
hold_action:
action: more-info
card_layout: large
styles: |
.is-unavailable {
opacity: 0.5 !important;
}
.bubble-button-background {
opacity: 1 !important;
background-color: ${state === 'on' ? 'var(--warning-color)' : 'var(--background-color-2)'} !important;
transition: background-color 1s !important;
}
.bubble-icon-container {
background: ${state === 'on' ? 'var(--warning-color)' : 'var(--card-background-color)'} !important;
}
.bubble-icon-container::after {
opacity: ${state === 'on' ? 0.3 : 0} !important;
transition: all 1s !important;
}
.bubble-icon {
display: flex !important;
opacity: 0.5 !important;
}
.is-on .bubble-icon {
opacity: 1 !important;
}
visibility:
- condition: state
entity: binary_sensor.lightning_warning
state: 'on'
- type: custom:bubble-card
card_type: button
button_type: state
entity: binary_sensor.raining
name: It is currently raining
show_state: false
double_tap_action:
action: more-info
hold_action:
action: more-info
card_layout: large
styles: |
.is-unavailable {
opacity: 0.5 !important;
}
.bubble-button-background {
opacity: 1 !important;
background-color: ${state === 'on' ? 'var(--accent-color)' : 'var(--background-color-2)'} !important;
transition: background-color 1s !important;
}
.bubble-icon-container {
background: ${state === 'on' ? 'var(--accent-color)' : 'var(--card-background-color)'} !important;
}
.bubble-icon-container::after {
opacity: ${state === 'on' ? 0.3 : 0} !important;
transition: all 1s !important;
}
.bubble-icon {
display: flex !important;
opacity: 0.5 !important;
}
.is-on .bubble-icon {
opacity: 1 !important;
}
visibility:
- condition: state
entity: binary_sensor.raining
state: 'on'
- type: custom:clock-weather-card
entity: weather.iron_nerd_weather_station
sun_entity: sun.sun