Skip to content

feat: add max_battery_output_power sensor to ZendureManager#1141

Open
eremid wants to merge 1 commit intoZendure:masterfrom
eremid:feature/max-output-power-sensor
Open

feat: add max_battery_output_power sensor to ZendureManager#1141
eremid wants to merge 1 commit intoZendure:masterfrom
eremid:feature/max-output-power-sensor

Conversation

@eremid
Copy link
Copy Markdown
Contributor

@eremid eremid commented Mar 1, 2026

This pull request introduces a new max_battery_output_power sensor to the Zendure integration.

Need

The purpose of this sensor is to provide the actual total discharge capacity of the setup, considering both hardware limits and fuse group constraints. This allows users to:

  • Calculate battery utilization percentage: By comparing current power output to this maximum value, users can create informative dashboards or widgets showing how much of their discharge capacity is being used.
  • Accurate monitoring: The sensor dynamically updates based on the current configuration, including when devices are added or removed from fuse groups.

Key Changes

  • New Sensor: Added max_battery_output_power to ZendureManager.
  • Intelligent Calculation:
    • Sums the hardware discharge limits of all connected devices with batteries (kWh > 0).
    • Caps the sum for each fuse group by its maxpower configuration.
    • Aggregates the results across all fuse groups.
  • Dynamic Updates: The sensor value is refreshed when fuse groups change or during regular manager updates.
  • Translations: Added support for English, German, French, and Dutch.

Introduces a new sensor that calculates the cumulative maximum output power from batteries across all fuse groups.

The value is determined by summing the hardware discharge limits of all battery-equipped devices (kWh > 0) within each fuse group, constrained by the group's maximum power capacity.

- Added 'max_battery_output_power' entity to ZendureManager.
- Implemented calculation logic with fuse group capping and battery filtering.
- Ensured the sensor updates when fuse groups change or during the main manager update.
- Included translations for en, de, fr, and nl.
@eremid eremid changed the base branch from Develop to master March 1, 2026 07:41
@FireSon
Copy link
Copy Markdown
Collaborator

FireSon commented Mar 14, 2026

Hi @eremid I understand the idea, but I am a bit hesitant to add too many entities, since it becomes more difficult for new users to understand. It is clear you cannot access these values yourself. The place where you added the update is called very often, which to keep everything as smooth as possible is not ideal. In another PR I added something similar, the totalKwh. Let me think about fixing them together!

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.

2 participants