Skip to content

Add optional automatic remaining device power#71

Open
jefafafah wants to merge 2 commits into
pacemaker82:mainfrom
jefafafah:feature/remaining-device
Open

Add optional automatic remaining device power#71
jefafafah wants to merge 2 commits into
pacemaker82:mainfrom
jefafafah:feature/remaining-device

Conversation

@jefafafah

@jefafafah jefafafah commented Jun 29, 2026

Copy link
Copy Markdown

Summary

This adds an optional virtual device that displays the portion of home
power consumption that is not accounted for by configured devices.

image

The value is calculated as:

home power - sum of configured device power

The result is clamped to zero.

Behavior

  • The feature is opt-in via show_remaining_device: true.
  • Existing configurations remain unchanged when it is disabled.
  • No additional Home Assistant template sensor is required.
  • The remaining device exists only inside the card.
  • Invalid or unavailable values are handled safely (clamped to zero).
  • Tapping the remaining device opens the more-info panel of the home entity.

Configuration

Setting Default
show_remaining_device false
remaining_device_name Overige
remaining_device_icon mdi:devices
remaining_device_color #9e9e9e
remaining_device_threshold 5

Example:

show_remaining_device: true
remaining_device_name: Other
remaining_device_icon: mdi:help-circle
remaining_device_color: "#9e9e9e"
remaining_device_threshold: 10

Testing

  • JavaScript syntax validation (node --check)
  • Diff validation (no personal data, no debug code, no local configuration)

Add an optional virtual device that displays home power not accounted
for by configured devices.

The remaining value is calculated from total home consumption minus
the sum of configured device power and is clamped to zero.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant