Skip to content

Entities & Services

Entities

Each config entry creates one device. Entity names use Home Assistant's "has entity name" mode, so the device name is prefixed in the UI.

Register sensors

One sensor per profile register with entity: true and either basic: true or an active Pro licence. The entity id suffix is the register name, for example:

  • sensor.demo_energy_system_pv_power
  • sensor.demo_energy_system_battery_soc
  • sensor.demo_energy_system_heat_pump_flow_temperature

Attributes follow the profile: unit, device class, state class and precision. A register that cannot be decoded is unknown; a failed poll makes all register sensors unavailable.

Diagnostic and licence entities

Entity Type Meaning
Licence status sensor trial, active, grace, expired or free; attributes contain tier, features, customer, expiry and days remaining
Support time remaining sensor Minutes left in the support session, 0 when inactive
Support access switch Starts and stops a support session
Connection binary sensor Last poll reached the device; attributes contain transport statistics

Services

sg_energy_hub.activate_license

Field Required Meaning
license_blob yes Signed licence document

Verifies the signature and instance binding, stores the licence and reloads all entries.

sg_energy_hub.write_register

Requires an active Pro licence and enable_write in the options.

Field Required Meaning
entry_id only with multiple entries Config entry
register one of register/address Profile register name
address one of register/address Raw register address
value yes Engineering value; scale and offset are applied

The coordinator refreshes immediately after a successful write.

sg_energy_hub.start_support_session

Field Required Meaning
entry_id only with multiple entries Config entry
duration_hours no 1–24, default from options (4)

sg_energy_hub.end_support_session

Field Required Meaning
entry_id no Omitting it ends all sessions

sg_energy_hub.export_diagnostics

Returns the same redacted payload as the Home Assistant diagnostics download.

Field Required Meaning
entry_id no Omitting it exports all entries
service: sg_energy_hub.export_diagnostics
response_variable: diagnostics