Then for the dashboard i created the following code for the markdown card
type: markdown
content: |-
{% set devices = [
{"name": "Washer", "cost": "sensor.washer_monthly_cost", "active": states('sensor.washer_plug_electric_consumption_w') | float(0) > 2.5, "watts": "sensor.washer_plug_electric_consumption_w"},
{"name": "Dryer", "cost": "sensor.dryer_monthly_cost", "active": states('sensor.dryer_plug_electric_consumption_w') | float(0) > 0.1, "watts": "sensor.dryer_plug_electric_consumption_w"},
{"name": "Freezer", "cost": "sensor.freezer_monthly_cost", "active": states('sensor.freezer_plug_current_consumption_w') | float(0) > 0.1, "watts": "sensor.freezer_plug_current_consumption_w"},
{"name": "Office Heater", "cost": "sensor.office_heater_monthly_cost", "active": states('sensor.office_heater_plug_current_consumption_w') | float(0) > 0.1, "watts": "sensor.office_heater_plug_current_consumption_w"},
{"name": "Office Desk", "cost": "sensor.office_desk_monthly_cost", "active": states('sensor.office_desk_electric_consumption_w') | float(0) > 0.1, "watts": "sensor.office_desk_electric_consumption_w"},
{"name": "Ripley's Heater", "cost": "sensor.ripleys_heater_monthly_cost", "active": states('sensor.ripleys_heater_current_consumption_w') | float(0) > 0.1, "watts": "sensor.ripleys_heater_current_consumption_w"},
{"name": "Master Bedroom Heater", "cost": "sensor.master_bedroom_heater_monthly_cost", "active": states('sensor.master_bedroom_heater_current_consumption_w') | float(0) > 0.1, "watts": "sensor.master_bedroom_heater_current_consumption_w"},
{"name": "Kitty Litter Fan", "cost": "sensor.kitty_litter_fan_monthly_cost", "active": states('sensor.kitty_litter_fan_electric_consumption_w') | float(0) > 0.1, "watts": "sensor.kitty_litter_fan_electric_consumption_w"}
] %}
{% set lights = [
{"name": "Couch Light", "cost": "sensor.couch_light_monthly_cost", "active": is_state('light.couch_lights', 'on'), "watts": "sensor.couch_lights_electric_consumption_w"},
{"name": "Office Light", "cost": "sensor.office_light_monthly_cost", "active": is_state('light.office_lights', 'on'), "watts": "sensor.office_lights_electric_consumption_w"},
{"name": "Driveway Light", "cost": "sensor.driveway_light_monthly_cost", "active": is_state('light.driveway_light', 'on'), "watts": "sensor.driveway_light_electric_consumption_w"},
{"name": "Theatre Room Lights", "cost": "sensor.theatre_room_lights_monthly_cost", "active": is_state('light.theatre_room_lights', 'on'), "watts": "sensor.theatre_room_lights_electric_consumption_w"},
{"name": "Spa Lights", "cost": "sensor.spa_lights_monthly_cost", "active": is_state('light.spa_light', 'on'), "watts": "sensor.spa_light_electric_consumption_w"},
{"name": "Laundry Room Lights", "cost": "sensor.laundry_room_lights_monthly_cost", "active": is_state('light.laundry_room_light', 'on'), "watts": "sensor.laundry_room_light_electric_consumption_w"},
{"name": "Amanda's Light", "cost": "sensor.amanda_s_light_monthly_cost", "active": is_state('light.amandas_light', 'on'), "watts": "sensor.amandas_light_energy_consumption_w"},
{"name": "Steve's Light", "cost": "sensor.steve_s_light_monthly_cost", "active": is_state('light.steves_light', 'on'), "watts": "sensor.steves_light_energy_consumption_w"},
{"name": "Patio Lanterns", "cost": "sensor.patio_lanterns_monthly_cost", "active": is_state('light.patio_lanterns', 'on'), "watts": "sensor.spa_light_electric_consumption_w"}
] %}
<table width='100%'>
<thead>
<tr>
<td>Home Energy Meter</td>
<td align="right">${{"%.2f"|format(states('sensor.house_energy_monthly_cost') | float(0)) }}</td>
<td align="right">{{"%.2f"|format(states('sensor.home_energy_meter_electric_consumption_w') | float(0)) }}</td>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3"><hr style="border: 1px solid white;"></td>
</tr>
<tr>
<td align="left">Devices</td>
<td align="right"></td>
<td align="right"></td>
</tr>
{% for device in devices %}
<tr>
<td>{{device.name}}{% if device.get('active', False) %}<font color="Blue"><ha-icon icon="mdi:lightning-bolt"></ha-icon></font> {% endif %}</td>
<td align="right">${{"%.2f"|format(states(device.cost) | float(0))}}</td>
<td align="right">{{"%.2f"|format(states(device.watts) | float(0))}}</td>
</tr>
{% endfor %}
<tr>
<th align="left"><br>Lights</td>
<th align="right"></td>
<th align="right"></td>
</tr>
{% for light in lights %}
<tr>
<td>{{light.name}}{% if light.get('active', False) %}<font color="Blue"><ha-icon icon="mdi:lightning-bolt"></ha-icon></font> {% endif %}</td>
<td align="right">${{"%.2f"|format(states(light.cost) | float(0))}}</td>
<td align="right">{{"%.2f"|format(states(light.watts) | float(0))}}</td>
</tr>
{% endfor %}
<tr>
<td colspan="3"><hr style="border: 1px solid white;"></td>
</tr>
<tr>
<td>Total</td>
<td align="right">${{"%.2f"|format(states('sensor.total_monthly_cost') | float(0)) }}</td>
<td align="right"></td>
</tr>
</tbody>
</table>
title: Energy Usage & Cost
card_mod:
style: |
ha-card {
--mdc-icon-size: 14px;
}
This one i want to make a bit more dynamic somehow but I am not sure how I could. I am open to suggestions. For now you just update the array above with your devices and what entities that you want to use to determine if its on or off, or running or stopped… Also what entities you use to pull that Watts form and monthly costs…