diff --git a/custom_components/smarthashtag/sensor.py b/custom_components/smarthashtag/sensor.py index cead2c5..817b17c 100644 --- a/custom_components/smarthashtag/sensor.py +++ b/custom_components/smarthashtag/sensor.py @@ -208,12 +208,6 @@ def native_value(self) -> int: return None return data - # invert power consumption value to display the consumed power as positive - if "average_power_consumption" in self.entity_description.key: - if data.value: - return data.value * -1 - return data - if isinstance(data, ValueWithUnit): return data.value diff --git a/custom_components/smarthashtag/sensor_groups/battery.py b/custom_components/smarthashtag/sensor_groups/battery.py index a298e5d..478a317 100644 --- a/custom_components/smarthashtag/sensor_groups/battery.py +++ b/custom_components/smarthashtag/sensor_groups/battery.py @@ -123,9 +123,9 @@ SensorEntityDescription( key="average_power_consumption", translation_key="average_power_consumption", - name="Average power consumption", - icon="mdi:power", - device_class=SensorDeviceClass.POWER, + name="Range efficiency factor", + icon="mdi:gauge", + native_unit_of_measurement="%", state_class=SensorStateClass.MEASUREMENT, suggested_display_precision=1, ), diff --git a/custom_components/smarthashtag/translations/de.json b/custom_components/smarthashtag/translations/de.json index b70c412..f7c0601 100644 --- a/custom_components/smarthashtag/translations/de.json +++ b/custom_components/smarthashtag/translations/de.json @@ -116,7 +116,7 @@ "name": "Ladeziel" }, "average_power_consumption": { - "name": "Durchschnittsverbrauch" + "name": "Reichweiteneffizienzfaktor" }, "position": { "name": "Position" diff --git a/custom_components/smarthashtag/translations/en.json b/custom_components/smarthashtag/translations/en.json index 98fa8cf..ba658fc 100644 --- a/custom_components/smarthashtag/translations/en.json +++ b/custom_components/smarthashtag/translations/en.json @@ -116,7 +116,7 @@ "name": "Charging target" }, "average_power_consumption": { - "name": "Average Power Consumption" + "name": "Range Efficiency Factor" }, "position": { "name": "Position"