Skip to content
Projects

flixlix/energy-period-selector-plus

View on GitHub

About

An upgraded Energy Date Selection Card for Home Assistant, with added customizability, while maintaining the Energy Dashboard's original design.

Productivity

How these counts are measured

What you can do

  • Day / week / month / year / custom period buttons, in the order you list them
  • Custom ranges are picked in Home Assistant's own calendar, with its presets; with date_picker, the date opens it in every period
  • Previous, next and today buttons
  • Compare with the previous period (icon or text button)

Measured star growth

in 24h
0
in 7 days
0
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

Energy Period Selector Plus

ko-fi support GitHub total downloads

Energy Period Selector Plus with the month selected, above Energy Flow Card Plus showing that month

Picks the period shown by Home Assistant's energy cards (and Energy Flow Card Plus / Energy Breakdown Card with energy_date_selection: true) on the same dashboard. Like HA's energy date picker, with period buttons, an optional compare button and a card background so it matches the cards around it.

Features

  • Day / week / month / year / custom period buttons, in the order you list them
  • Custom ranges are picked in Home Assistant's own calendar, with its presets; with date_picker, the date opens it in every period
  • Previous, next and today buttons
  • Compare with the previous period (icon or text button)
  • Optional card background and title
  • Visual editor

Configuration

Name Type Default Description
type string — custom:energy-period-selector-plus
card_background boolean false Show the selector on a card
title string — Card title, with card_background: true
prev_next_buttons boolean true Show the previous and next buttons
date_picker boolean false Click the date to pick any range in HA's calendar, in every period (always on for custom)
today_button_type text / icon / false text Style of the today button, false hides it
compare_button_type text / icon — Show a button that compares with the previous period
compare_button_label string HA's "Compare data" Label of the text compare button
period_buttons list [day, week, month, year] Period buttons and their order. Add custom to pick any range in HA's calendar
custom_period_label string Custom Label of the custom button
collection_key string the dashboard's Like in HA's energy cards: drive another energy collection. Must start with energy_

Examples

type: custom:energy-period-selector-plus
card_background: true
type: custom:energy-period-selector-plus
card_background: true
title: Energy period
today_button_type: icon
compare_button_type: icon
period_buttons: [month, year, custom]

How it works with Home Assistant

The selector only drives the energy collection that HA itself creates, so it keeps working when HA changes its energy data (it no longer carries its own copy of HA's energy loader). On a dashboard without any of HA's energy cards it adds a hidden HA energy date picker, so HA creates the collection. The period you pick is remembered for the next visit, as with HA's own picker.

Explore related projects

Loading…