Skip to content

Commit df1e61e

Browse files
committed
Merge branch 'Dev-v.1.2.1' of https://github.com/TypQxQ/Sigenergy-Local-Modbus into Dev-v.1.2.1
2 parents 16deab8 + 1957c21 commit df1e61e

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

custom_components/sigen/static_sensor.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ class StaticSensors:
9797
device_class=SensorDeviceClass.BATTERY,
9898
native_unit_of_measurement=PERCENTAGE,
9999
state_class=SensorStateClass.MEASUREMENT,
100-
icon="mdi:battery",
100+
# Intentionally no hardcoded icon: allow Home Assistant to use
101+
# the default dynamic battery icon based on SOC.
101102
),
102103
SigenergySensorEntityDescription(
103104
key="plant_phase_a_active_power",
@@ -1068,19 +1069,7 @@ class StaticSensors:
10681069
icon="mdi:ev-station",
10691070
suggested_unit_of_measurement=UnitOfEnergy.MEGA_WATT_HOUR,
10701071
entity_registry_enabled_default=False,
1071-
),
1072-
SigenergySensorEntityDescription(
1073-
key="plant_total_charged_energy_of_the_evac",
1074-
name="Total Charged Energy of the EVAC",
1075-
device_class=SensorDeviceClass.ENERGY,
1076-
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
1077-
suggested_display_precision=2,
1078-
state_class=SensorStateClass.TOTAL,
1079-
round_digits=6,
1080-
icon="mdi:ev-station",
1081-
suggested_unit_of_measurement=UnitOfEnergy.MEGA_WATT_HOUR,
1082-
entity_registry_enabled_default=False,
1083-
),
1072+
)
10841073
]
10851074

10861075
INVERTER_SENSORS = [
@@ -1299,7 +1288,8 @@ class StaticSensors:
12991288
device_class=SensorDeviceClass.BATTERY,
13001289
native_unit_of_measurement=PERCENTAGE,
13011290
state_class=SensorStateClass.MEASUREMENT,
1302-
icon="mdi:battery",
1291+
# Intentionally no hardcoded icon: allow Home Assistant to use
1292+
# the default dynamic battery icon based on SOC.
13031293
),
13041294
SigenergySensorEntityDescription(
13051295
key="inverter_ess_battery_soh",
@@ -1769,7 +1759,8 @@ class StaticSensors:
17691759
device_class=SensorDeviceClass.BATTERY,
17701760
native_unit_of_measurement=PERCENTAGE,
17711761
state_class=SensorStateClass.MEASUREMENT,
1772-
icon="mdi:battery",
1762+
# Intentionally no hardcoded icon: allow Home Assistant to use
1763+
# the default dynamic battery icon based on SOC.
17731764
),
17741765
SigenergySensorEntityDescription(
17751766
key="dc_charger_current_charging_capacity",

0 commit comments

Comments
 (0)