Skip to content

Backup generator as grid-replacement power source #808

@llaforest

Description

@llaforest

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The card models the generator only as an AUX load output (aux_type: gen). There is no way to display a backup generator as a power input source — the equivalent of the grid branch but fed by a generator instead of the utility grid.

Expected behaviour

When a backup generator is running, the grid branch of the card should visually replace itself with a generator representation: generator icon, generator colour, and generator telemetry (power, voltage, frequency, current, optional daily production). When the generator stops, the display reverts to the normal grid view automatically.

Possible Solutions

Since grid and generator are physically mutually exclusive (both impose a sine wave — they cannot run in parallel), a clean approach would be to add an optional generator: config section. When a generator_status entity is in a running state, the card swaps the grid icon and metrics for generator equivalents in exactly the same SVG position — no layout changes needed. Nonessential loads (grid-tied) would auto-hide during generator operation, which is also electrically correct.

New entities would be additive and opt-in:

generator_status      # running / off
generator_power       # W
generator_voltage     # V  
generator_frequency   # Hz
generator_current     # A
day_generator_energy  # daily kWh

This approach is fully backward-compatible — users without a generator see zero change.

I am willing to implement this and submit a PR if the approach sounds acceptable to the maintainers.

Mode

Both

Context / Reason

I have a Luxpower 12k inverter configured as a whole-house backup system at an on-grid chalet (generator + solar + battery, upstream of the main breaker panel). During extended grid outages (35+ hours in my recent case), the generator kicks in to recharge the battery. The card currently has no way to show the generator's contribution to the system — it just shows a disconnected grid icon with no information about what is actually powering the home.

This is a real use case for anyone with a hybrid inverter in an off-grid or backup-generator configuration, which is common with Sunsynk, Lux, Deye and similar inverters that support generator input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions