I am using this basic theme available in HACS
https://github.com/KTibow/lovelace-soft-theme
for extra styling, CARD_MOD is required and also available in HACS
here is the code for the house usage, solar generation, and export card:
type: custom:bar-card
name: Grid Export
tap_action: none
entities:
- entity: sensor.home_usage_minus_solar_above_0
min: 0
max: 3000
height: 66
severity:
- color: transparent
from: 0
to: 3000
icon: mdi:transmission-tower-export
entity_row: true
positions:
icon: inside
indicator: inside
name: inside
value: inside
card_mod:
style: |
bar-card-currentbar {
border-radius: 15px;
background: linear-gradient(to right, rgb(164, 195, 210) 5%, rgb(121, 210, 179) 15%, rgb(252, 245, 112) 50%, rgb(240, 128, 48) 90%);
clip-path: polygon(0 0, var(--bar-percent) 0, var(--bar-percent) 100%, 0 100%);
}
bar-card-backgroundbar {
border-radius: 15px;
background: linear-gradient(to right, rgb(164,195,210) 5%, rgb(121,210,179) 15%, rgb(252,245,112) 50%, rgb(240,128,48) 90%);
box-shadow: -5px -5px 15px #2c2c2c, 5px 5px 15px #191919;
}
bar-card-card {
border: none;
padding: auto;
margin-bottom: -25px;
#box-shadow: -5px -5px 15px #2c2c2c, 5px 5px 15px #191919;
}
ha-icon {
{% set power_usage = states('sensor.home_usage_minus_solar_above_0') | int %}
{% if power_usage > 500 %}
color: var(--primary-background-color);
{% else %}
color: var(--primary-text-color);
{% endif %}
}
bar-card-name {
{% set power_usage = states('sensor.home_usage_minus_solar_above_0') | int %}
{% if power_usage > 1000 %}
color: var(--primary-background-color);
{% else %}
color: var(--primary-text-color);
{% endif %}
}
Below is the code for the light card:
type: custom:mushroom-light-card
entity: light.kitchen_led_kitchen_led
use_light_color: true
show_brightness_control: true
collapsible_controls: true
show_color_control: true
show_color_temp_control: true
layout: vertical
icon: mdi:led-strip-variant
name: Kitchen LED
card_mod:
style: |
ha-card:active {
transform: scale(1.02);
transition: 0s;
}
ha-card {
{% if states(config.entity) == 'on' %}
border: none !important;
box-shadow: inset 5px 5px 15px #191919, inset -5px -5px 15px #2c2c2c;
background: linear-gradient(to top, rgba{{state_attr(config.entity,'rgb_color') + (0.01,)}}, rgba{{state_attr(config.entity,'rgb_color') + (0.2,)}});
{% endif %}
}
ā¦and more
type: custom:mushroom-template-card
primary: Home
secondary: >-
{{ 'All Doors Closed' if is_state('binary_sensor.doors_group', 'off') else
'Door(s) Open' }}, {{ 'All lights off' if states.light | selectattr('state',
'eq', 'on') | list | count == 0 else (states.light | selectattr('state', 'eq',
'on') | list | count) ~ ' light(s) on' }}
icon: mdi:home
layout: horizontal
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
icon_color: ''
card_mod:
style: |
ha-card {
{% if states('binary_sensor.doors_group') == 'on' %}
box-shadow: inset 5px 5px 15px #191919, inset -5px -5px 15px #2c2c2c;
animation: ping 2s infinite;
{% endif %}
}
ha-state-icon {
{% if states('binary_sensor.doors_group') == 'on' %}
color: rgba(var(--rgb-red), 0.7);
}
@keyframes ping {
0% {box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);}
70% {box-shadow: 0 0 0 10px transparent;}
100% {box-shadow: 0 0 0 0 transparent;}
}
{% endif %}
}
type: custom:mushroom-template-card
primary: Garage
secondary: >-
{{ ('Washing Machine, Running' if states('sensor.washing_plug_power')|float >
5 else 'Washing Machine, Finished') }}
icon: mdi:washing-machine
layout: horizontal
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
icon_color: ''
card_mod:
style: |
ha-state-icon {
{% if states('sensor.washing_plug_power') |float > 5 %}
animation: wobbling 0.7s linear infinite alternate;
{% endif %}
}
@keyframes wobbling {
0% { transform: rotate(-80deg); }
100% { transform: rotate(40deg); }
}
I hope this helps.