Skip to content

Conversation

@fbradyirl
Copy link

Seeing an error in logs which is caused by a duplicate sensor definition in sigen/static_sensor.py. The key plant_total_charged_energy_of_the_evac appears twice, so HA generates the same unique_id twice.

Remove duplicate plant_total_charged_energy_of_the_evac
@greptile-apps
Copy link

greptile-apps bot commented Feb 6, 2026

Greptile Overview

Greptile Summary

  • Removes a duplicated sensor entity description in custom_components/sigen/static_sensor.py that reused the same key (plant_total_charged_energy_of_the_evac).
  • Prevents Home Assistant from generating the same unique_id twice for the EVAC “Total Charged Energy” sensor.
  • Change is localized to static sensor definitions; no behavior changes elsewhere in the integration.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • The change only removes an exact duplicate sensor definition entry, directly addressing the reported unique_id collision without altering surrounding entity description structure or semantics.
  • No files require special attention

Important Files Changed

Filename Overview
custom_components/sigen/static_sensor.py Removes a duplicate SigenergySensorEntityDescription entry for key plant_total_charged_energy_of_the_evac, preventing Home Assistant unique_id collisions; no other logic changes observed.

Sequence Diagram

sequenceDiagram
  participant Dev as Developer
  participant HA as Home Assistant
  participant Int as sigen integration
  participant SS as static_sensor.py

  Dev->>Int: Install/upgrade integration
  HA->>Int: Setup platform
  Int->>SS: Load static sensor definitions
  SS-->>Int: Return sensor list (keys -> unique_id)
  Int->>HA: Register entities
  HA-->>HA: Detect duplicate unique_id
  HA-->>Int: Log error/warn about duplicate entity
  Int-->>Dev: Duplicate sensor definition root cause
Loading

entity_registry_enabled_default=False,
),
SigenergySensorEntityDescription(
key="plant_total_charged_energy_of_the_evac",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dupe of this.

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