If you have the Sense Energy monitor with solar, check out this custom Power Wheel:
To create this yourself:
- Create a template sensor:
- platform: template
sensors:
grid_power_production:
friendly_name: 'Grid power production'
unit_of_measurement: 'W'
value_template: >-
{{ (states("sensor.energy_usage") | float | int) + (states("sensor.energy_production") | float | int | abs) }}
- Install button card through HACS
- Add this messy code to your Lovelace code:
- type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: "custom:button-card"
color_type: label-card
name: Sense
styles:
card:
- font-size: 35px
- box-shadow: none
- background: none
- padding-top: 30%
- type: "custom:button-card"
entity: sensor.energy_usage
color_type: icon
show_name: true
name: Home
size: 75%
show_state: true
show_icon: true
icon: mdi:home
styles:
card:
- font-size: 14px
- box-shadow: none
- background: none
icon:
- color: 'rgb(220,69,121)'
- type: "custom:button-card"
color_type: label-card
name: >
[[[
return `<table><tr><td>Daily kWh</td></tr>
<tr><td>${states['sensor.daily_production'].state} / ${states['sensor.daily_usage'].state}</td></tr>
<tr><td> </td></tr>
<tr><td>Weekly kWh</td></tr>
<tr><td>${states['sensor.weekly_production'].state} / ${states['sensor.weekly_usage'].state}</td></tr>
</table>`
]]]
styles:
card:
- font-size: 16px
- margin-top: 10%
- box-shadow: none
- background: none
- type: horizontal-stack
cards:
- type: "custom:button-card"
color_type: blank-card
- type: "custom:button-card"
color_type: blank-card
- type: "custom:button-card"
entity: sensor.grid_power_production
color_type: icon
size: 75%
show_name: false
show_state: false
show_icon: true
icon: mdi:arrow-top-right-thick
styles:
card:
- box-shadow: none
- background: none
icon:
- color: 'rgb(220,69,121)'
- animation: blink 2s ease infinite
- type: "custom:button-card"
color_type: blank-card
- type: "custom:button-card"
color_type: blank-card
- type: "custom:button-card"
color_type: blank-card
- type: "custom:button-card"
color_type: blank-card
- type: "custom:button-card"
color_type: blank-card
- type: horizontal-stack
cards:
- type: "custom:button-card"
entity: sensor.grid_power_production
color_type: icon
size: 55%
show_name: true
name: From Grid
show_state: true
show_icon: true
icon: mdi:transmission-tower
styles:
card:
- font-size: 14px
- box-shadow: none
- background: none
icon:
- color: 'rgb(220,69,121)'
- type: "custom:button-card"
entity: sensor.grid_power_production
color_type: icon
show_name: false
show_state: false
show_icon: true
icon: mdi:arrow-left-thick
aspect_ratio: 2.5/.8
styles:
card:
- top: 60%
- box-shadow: none
- background: none
icon:
- color: 'rgb(220,69,121)'
- animation: blink 2s ease infinite
- type: "custom:button-card"
entity: sensor.energy_production
color_type: icon
size: 60%
show_name: true
name: Solar
show_state: true
show_icon: true
icon: mdi:white-balance-sunny
styles:
card:
- font-size: 14px
- box-shadow: none
- background: none
icon:
- color: 'rgb(220,69,121)'
- Replace the entity names (ex. sensor.xyz) appropriately as yours may differ
TIP:
You can (and I will for my personal code) template the Lovelace above with the decluttering card.
NOTE:
Yes I am aware of the Lovelace Power Wheel Card. This method is easier and more closely mimics the Power Wheel in the Sense app (with additional useful data like daily and weekly production/consumption).
ENJOY!