A Home Assistant custom integration that pulls the official DTE residential electric rate card PDF, parses rates dynamically, and exposes import/export price entities that track time-of-day and season.
- Downloads the live DTE Residential Electric Rate Card PDF.
- Parses plans, periods, windows, and component pricing dynamically.
- Updates daily so current-month PSCR changes are picked up promptly.
- Exposes entities for:
- Current import rate (
USD/kWh) - Current export rate (
USD/kWh) - Current rate name (string)
- Full schedule entity (structured schedule attributes)
- Current import rate (
- Handles net-metering option for export calculation.
- Warns when a previously selected rate disappears from the latest card.
- Includes a custom Lovelace card (
custom:dte-rates-card).
- Home Assistant with support for custom integrations.
- Internet access from Home Assistant to:
dteenergy.com(rate card PDF)michigan.gov(MPSC electric rate book PSCR data)
- Open HACS -> Integrations -> three-dot menu -> Custom repositories.
- Add repository URL
https://github.com/javaDevJT/DTE-Rates-for-Home-Assistantand set category to Integration. - Install DTE Residential Rates from HACS.
- Restart Home Assistant.
- Go to Settings -> Devices & Services -> Add Integration.
- Search for DTE Residential Rates and complete setup.
- Copy the folder:
custom_components/dte_ratesinto your Home Assistant config directory under:/config/custom_components/dte_rates
- Restart Home Assistant.
- Go to Settings -> Devices & Services -> Add Integration.
- Search for DTE Residential Rates and complete setup.
During setup you choose:
- Rate plan from the currently parsed DTE PDF.
- Net metering enabled (checkbox).
- Include PSCR (enabled by default).
- Tax rate (%) (free-form, defaults to
4.0; set to0to omit tax). - Detroit residents may incur an additional 5.0% City Utility Users' Tax; adjust the free-form tax rate if that applies to your service address.
DTE Import Ratedevice_class: monetaryunit: USD/kWh
DTE Export Ratedevice_class: monetaryunit: USD/kWh
DTE Current Rate Name- string state (example:
Winter Off-Peak)
- string state (example:
DTE Rate Schedule- contains structured schedule attributes for dashboard usage
Core rate entities include attributes such as:
current_rate_namenext_rate_changenext_rate_namenext_rate_valuecomponentsmonthly_componentscard_effective_dateinclude_pscrtax_rate_percentpscr_centscurrent_rate_formulacurrent_rate_calculationselected_rate_availablewarning(when selected plan disappears)
Domain: dte_rates
dte_rates.refresh_rate_card- Force refresh now (all entries or by
entry_id).
- Force refresh now (all entries or by
dte_rates.show_rate_schedule- Show parsed schedule in a persistent notification.
dte_rates.show_lovelace_card_example- Creates a notification with card resource + YAML example.
Card type: custom:dte-rates-card
- Settings -> Dashboards -> three-dot menu -> Resources.
- Add resource:
- URL:
/dte_rates_files/dte-rates-card.js - Type:
JavaScript Module
- URL:
- Save and hard refresh browser.
type: custom:dte-rates-card
title: DTE Residential Rates
import_entity: sensor.dte_import_rate
export_entity: sensor.dte_export_rate
name_entity: sensor.dte_current_rate_name
schedule_entity: sensor.dte_rate_scheduleUse DTE Import Rate as your current electricity price entity (USD/kWh) where appropriate in Home Assistant Energy configuration.
- Browser caches card JS aggressively.
- Update resource URL to include a version suffix, for example:
/dte_rates_files/dte-rates-card.js?v=3
- Then hard refresh browser.
- Restart Home Assistant and hard refresh browser.
- Re-create integration entry if metadata is cached.
- The integration sets warning attributes and creates persistent notifications.
- Re-open integration config and choose a current rate.
- Import is full per-kWh total for the active period, plus PSCR when enabled, then the configured tax percentage.
- Rider 18 export is generation plus PSCR when enabled. Tax is not added to Rider 18 export credits.
- Export uses the modified import rate when net metering is enabled.
- Next-rate calculations are schedule-aware and aligned to time boundaries.
custom_components/dte_rates/-> integration codecustom_components/dte_rates/frontend/-> Lovelace card modulecustom_components/dte_rates/services.yaml-> service docshacs.json-> HACS metadata
- Site: javadevjt.tech
- Buy me a coffee: buymeacoffee.com/javadevjt