Skip to content

A power distribution card inspired by the official Energy Distribution card for Home Assistant

Notifications You must be signed in to change notification settings

foXaCe/power-flow-card-plus

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Power Flow Card Plus - Modern Edition

hacs_badge GitHub release (latest by date)

Power Flow Card Plus Demo

๐ŸŒŸ About This Project

This is a modernized and enhanced fork of the original Power Flow Card Plus by flixlix.

Why This Fork?

The original Power Flow Card Plus is an excellent project, but needed updates to work with the latest Home Assistant versions and modern web standards. This fork brings:

  • โœ… Updated for latest Home Assistant - Full compatibility with recent HA versions
  • โœ… Modern codebase - Updated dependencies and improved performance
  • โœ… New features - Arrow customization, custom positioning, daily cost/export tracking
  • โœ… Enhanced editor - Wider modal, better UX, visual editors for positioning and flows
  • โœ… Bug fixes - Resolved issues with infinite re-renders and validation errors
  • โœ… Continued development - Active maintenance and feature additions

๐Ÿ™ Big thanks to flixlix for creating the original Power Flow Card Plus! This modernized version builds upon their excellent work.


๐Ÿ’ฐ Support the Project

If this integration is useful to you, you can support its development with a Bitcoin donation:

๐Ÿช™ Bitcoin Address: bc1qhe4ge22x0anuyeg0fmts6rdmz3t735dnqwt3p7

Your contributions help me continue improving this project and adding new features. Thank you! ๐Ÿ™

โœจ New Features in Modern Edition

๐ŸŽจ Arrow Customization (v0.10.0+)

Customize the appearance and position of energy flow arrows:

  • Color - Any hex color for each arrow
  • Thickness - Line width from 0.5 to 10px
  • Horizontal/Vertical Offset - Position adjustment (-200 to +200px)

Currently available for:

  • Solar โ†’ Home
  • Grid โ†’ Home
  • Solar โ†’ Daily Export

๐Ÿ“ Custom Circle Positioning (v0.8.0+)

Move any circle to a custom position on the card:

  • Manual positioning with pixel precision
  • Reset buttons to restore defaults
  • Visual position editor with current values

๐Ÿ’ฐ Daily Cost & Export Tracking (v0.7.0+)

  • Daily Cost - Track daily energy costs with real-time tariff integration
  • Daily Export Revenue - Monitor earnings from grid export
  • Configurable decimal places and units

๐Ÿ–ฑ๏ธ Enhanced Editor (v0.10.1+)

  • Wider modal - 90% viewport width (max 1200px)
  • Real-size preview - See the card as it appears on dashboard
  • Dedicated editors - Separate pages for positioning, flows, and arrows

๐Ÿ“ฆ Installation

HACS (Manual)

  1. Open HACS
  2. Go to "Frontend"
  3. Click the 3 dots in the top right
  4. Select "Custom repositories"
  5. Add https://github.com/foXaCe/power-flow-card-plus with category "Dashboard"
  6. Click "Install"

Manual Install

  1. Download power-flow-card-plus.js from the latest release
  2. Copy it to your config/www directory
  3. Add the resource reference:
resources:
  - url: /local/power-flow-card-plus.js
    type: module

Or via UI:

  1. Settings โ†’ Dashboards โ†’ Resources
  2. Add resource: /local/power-flow-card-plus.js (type: JavaScript Module)

๐Ÿš€ Quick Start

Minimal Configuration

type: custom:power-flow-card-plus
entities:
  grid:
    entity: sensor.grid_power
  solar:
    entity: sensor.solar_production
  battery:
    entity: sensor.battery_power
    state_of_charge: sensor.battery_soc

Full Example with New Features

type: custom:power-flow-card-plus
entities:
  grid:
    entity:
      consumption: sensor.grid_consumption
      production: sensor.grid_production
    display_state: one_way
    color_circle: true
  solar:
    entity: sensor.solar_production
  battery:
    entity:
      consumption: sensor.battery_consumption
      production: sensor.battery_production
    state_of_charge: sensor.battery_soc
    display_state: one_way
  home:
    entity: sensor.home_consumption

# Daily Cost Tracking
show_daily_cost: true
daily_cost_energy_entity: sensor.daily_import
cost_entity: sensor.electricity_tariff
cost_decimals: 2

# Daily Export Revenue
show_daily_export: true
daily_export_energy_entity: sensor.daily_export
daily_export_price: 0.11
daily_export_decimals: 2

# Custom Circle Positions
custom_positions:
  solar:
    top: 10
    left: 50
  grid:
    top: 10
    left: -50

# Arrow Customization
arrows:
  solar_to_home:
    color: "#FFA500"
    thickness: 3
    offset_x: 10
  grid_to_home:
    color: "#4285F4"
    thickness: 2.5

# General Settings
watt_threshold: 1000
kw_decimals: 2
w_decimals: 0
clickable_entities: true

๐ŸŽฏ Core Features

All original Power Flow Card Plus features are included:

  • ๐ŸŽจ UI Editor - Visual configuration without YAML
  • ๐ŸŒ Multi-language - 17 languages supported
  • โ†•๏ธ Bidirectional Flows - Individual entities with both consumption/production
  • โ„น๏ธ Secondary Information - Additional info for all circles
  • โšก Power Outage Display - Visual indication of grid outages
  • ๐Ÿ“™ Template Support - Use Home Assistant templates
  • ๐ŸŽจ Extensive Customization - Colors, icons, labels, and more

๐Ÿ“– Configuration

Entities Object

Name Type Description
grid object Grid consumption/production entity
solar object Solar production entity
battery object Battery charge/discharge and state of charge
home object Home consumption entity
individual array Individual device entities (up to 4)
fossil_fuel_percentage object Low-carbon energy percentage

Card Options

Name Type Default Description
watt_threshold number 0 Watts before converting to kW
kw_decimals number 1 Decimal places for kW
w_decimals number 1 Decimal places for W
min_flow_rate number 0.75 Fastest dot speed (seconds)
max_flow_rate number 6 Slowest dot speed (seconds)
clickable_entities boolean false Click entities to open more-info
disable_dots boolean false Hide animated dots
circle_border_width number 2 Circle border thickness (1-10px)
circle_pulse_animation boolean false Animate circles when energy flows
circle_gradient_mode boolean false Use gradient colors for circles

Arrow Customization

arrows:
  solar_to_home:
    color: "#FFA500"
    thickness: 2.5
    offset_x: 10
    offset_y: -5
  grid_to_home:
    color: "#4285F4"
    thickness: 3

Custom Positions

custom_positions:
  solar:
    top: 20      # pixels from default position
    left: 50
  grid:
    top: -10
    left: -30
  battery:
    top: 15
    left: 0

Daily Cost & Export

# Daily Cost
show_daily_cost: true
daily_cost_energy_entity: sensor.daily_energy_import
cost_entity: sensor.current_tariff
cost_unit: "โ‚ฌ/kWh"
cost_decimals: 2

# Daily Export Revenue
show_daily_export: true
daily_export_energy_entity: sensor.daily_energy_export
daily_export_price: 0.11
daily_export_decimals: 2

๐ŸŽจ Visual Editor

Use the built-in visual editors for easy configuration:

Position Editor

  1. Open card editor
  2. Click "Custom Positions"
  3. Enter pixel values or use reset buttons
  4. See default positions as reference

Flows & Appearance Editor

  1. Open card editor
  2. Click "Flows & Appearance"
  3. Adjust animation speed, circle appearance, and display options
  4. Customize individual arrows (color, thickness, position)

๐ŸŒ Supported Languages

๐Ÿ‡บ๐Ÿ‡ธ English โ€ข ๐Ÿ‡ฉ๐Ÿ‡ช German โ€ข ๐Ÿ‡ซ๐Ÿ‡ท French โ€ข ๐Ÿ‡ช๐Ÿ‡ธ Spanish โ€ข ๐Ÿ‡ฎ๐Ÿ‡น Italian โ€ข ๐Ÿ‡ณ๐Ÿ‡ฑ Dutch โ€ข ๐Ÿ‡ต๐Ÿ‡น Portuguese (PT) โ€ข ๐Ÿ‡ง๐Ÿ‡ท Portuguese (BR) โ€ข ๐Ÿ‡ต๐Ÿ‡ฑ Polish โ€ข ๐Ÿ‡ท๐Ÿ‡บ Russian โ€ข ๐Ÿ‡ซ๐Ÿ‡ฎ Finnish โ€ข ๐Ÿ‡ฉ๐Ÿ‡ฐ Danish โ€ข ๐Ÿ‡จ๐Ÿ‡ฟ Czech โ€ข ๐Ÿ‡ธ๐Ÿ‡ฐ Slovak โ€ข ๐Ÿ‡ธ๐Ÿ‡ช Swedish โ€ข ๐Ÿ‡บ๐Ÿ‡ฆ Ukrainian โ€ข ๐Ÿ‡ฎ๐Ÿ‡ณ Hindi


๐Ÿ“ Changelog

See Releases for detailed changelog.

Recent Versions

  • v0.10.1 - Expanded editor modal for real-size preview
  • v0.10.0 - Arrow customization (3/7 arrows)
  • v0.9.4 - Fixed schema validation for arrows
  • v0.9.0 - Flows & appearance editor
  • v0.8.5 - Custom position editor fixes
  • v0.8.0 - Custom circle positioning

๐Ÿค Contributing

Contributions are welcome! This is a community-driven modernization effort.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

๐Ÿ“„ License

ISC License - Same as original project


๐Ÿ™ Credits

Original Author: flixlix - Created the excellent Power Flow Card Plus that this fork is based on.

Modern Edition: Maintained and enhanced for compatibility with latest Home Assistant versions and modern web standards.


๐Ÿ’ฌ Support & Issues

  • Issues: GitHub Issues
  • Discussions: Use GitHub Discussions for questions and feature requests

๐Ÿ”— Related Projects


Made with โค๏ธ for the Home Assistant community

About

A power distribution card inspired by the official Energy Distribution card for Home Assistant

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.6%
  • Other 1.4%