Skip to content

feat: #500 Add EVU2 and SmartGrid status sensors#503

Merged
rhammen merged 6 commits intoBenPru:mainfrom
siedi:feature/smartgrid-evu2-sensors
Jan 9, 2026
Merged

feat: #500 Add EVU2 and SmartGrid status sensors#503
rhammen merged 6 commits intoBenPru:mainfrom
siedi:feature/smartgrid-evu2-sensors

Conversation

@siedi
Copy link
Contributor

@siedi siedi commented Jan 1, 2026

  • Add EVU2 binary sensor (calculation ID 185: ID_WEB_HZIO_EVU2)
  • Add SmartGrid status sensor with 4 states based on EVU+EVU2
  • SmartGrid status: locked, reduced, normal, increased operation
  • Dynamic state-based icons for SmartGrid status
  • Sensor becomes unavailable when SmartGrid switch is disabled
  • Add translations for DE, EN, CS, NL, PL

siedi and others added 2 commits January 1, 2026 14:12
  - Add EVU2 binary sensor (calculation ID 185: ID_WEB_HZIO_EVU2)
  - Add SmartGrid status sensor with 4 states based on EVU+EVU2
  - SmartGrid status: locked, reduced, normal, increased operation
  - Dynamic state-based icons for SmartGrid status
  - Sensor becomes unavailable when SmartGrid switch is disabled
  - Add translations for DE, EN, CS, NL, PL
@rhammen
Copy link
Collaborator

rhammen commented Jan 5, 2026

@siedi Can you please change the pl.json. cs.json and de.json files to use JSON with all special characters converted to \uXXXX Unicode escape sequences.

Copy link
Collaborator

@rhammen rhammen left a comment

Choose a reason for hiding this comment

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

            and (
                description.luxtronik_key == LC.UNSET
                or key_exists(coordinator.data, description.luxtronik_key)
            )

Not all firmware versions may have the LP.P1030_SMART_GRID_SWITCH parameter that you use in the code later. So you need check here that this key exists, otherwise we will get complaints from users using firmware versions that do not yet support this parameter.

Ideally you also check for existence of the keys
LC.C0031_EVU_UNLOCKED and LC.C0185_EVU2
but the risk is significantly less because if LP.P1030_SMART_GRID_SWITCH exists then these should also exist.

Copy link
Collaborator

@rhammen rhammen left a comment

Choose a reason for hiding this comment

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

Would it be possible to put the whole code block starting with
if self.entity_description.key == SensorKey.SMART_GRID_STATUS:
in a separate function?
So we get

       if self.entity_description.key == SensorKey.SMART_GRID_STATUS
            some_function_doing_all_the required_things
       else:
            # For normal status sensors, use the parent's update logic
            super()._handle_coordinator_update(data)

This would keep the _handle_coordinator_update() function more readable.

@eliaslecomte
Copy link
Contributor

Cool work! Just curious, would it be possible to change the smartgrid status from home assistant? Or are physical relais always required?

@siedi
Copy link
Contributor Author

siedi commented Jan 6, 2026

Cool work! Just curious, would it be possible to change the smartgrid status from home assistant? Or are physical relais always required?

Nope, you need the physical relay. There is now way to set EVU/2

@rhammen rhammen merged commit f62be08 into BenPru:main Jan 9, 2026
5 checks passed
@siedi siedi deleted the feature/smartgrid-evu2-sensors branch February 28, 2026 16:08
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.

3 participants