mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Change Solarlog Watt-peak to Watt (#55110)
This commit is contained in:
parent
dc851b9dd5
commit
d3f17de072
@ -167,9 +167,10 @@ SENSOR_TYPES: tuple[SolarLogSensorEntityDescription, ...] = (
|
|||||||
SolarLogSensorEntityDescription(
|
SolarLogSensorEntityDescription(
|
||||||
key="total_power",
|
key="total_power",
|
||||||
json_key="totalPOWER",
|
json_key="totalPOWER",
|
||||||
name="total power",
|
name="installed peak power",
|
||||||
icon="mdi:solar-power",
|
icon="mdi:solar-power",
|
||||||
native_unit_of_measurement="Wp",
|
native_unit_of_measurement=POWER_WATT,
|
||||||
|
device_class=DEVICE_CLASS_POWER,
|
||||||
),
|
),
|
||||||
SolarLogSensorEntityDescription(
|
SolarLogSensorEntityDescription(
|
||||||
key="alternator_loss",
|
key="alternator_loss",
|
||||||
@ -185,7 +186,8 @@ SENSOR_TYPES: tuple[SolarLogSensorEntityDescription, ...] = (
|
|||||||
json_key="CAPACITY",
|
json_key="CAPACITY",
|
||||||
name="capacity",
|
name="capacity",
|
||||||
icon="mdi:solar-power",
|
icon="mdi:solar-power",
|
||||||
native_unit_of_measurement="W/Wp",
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
|
device_class=DEVICE_CLASS_POWER_FACTOR,
|
||||||
state_class=STATE_CLASS_MEASUREMENT,
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
),
|
),
|
||||||
SolarLogSensorEntityDescription(
|
SolarLogSensorEntityDescription(
|
||||||
|
@ -97,7 +97,7 @@ class SolarlogData:
|
|||||||
self.data["consumptionTOTAL"] = self.api.consumption_total / 1000
|
self.data["consumptionTOTAL"] = self.api.consumption_total / 1000
|
||||||
self.data["totalPOWER"] = self.api.total_power
|
self.data["totalPOWER"] = self.api.total_power
|
||||||
self.data["alternatorLOSS"] = self.api.alternator_loss
|
self.data["alternatorLOSS"] = self.api.alternator_loss
|
||||||
self.data["CAPACITY"] = round(self.api.capacity, 3)
|
self.data["CAPACITY"] = round(self.api.capacity * 100, 0)
|
||||||
self.data["EFFICIENCY"] = round(self.api.efficiency * 100, 0)
|
self.data["EFFICIENCY"] = round(self.api.efficiency * 100, 0)
|
||||||
self.data["powerAVAILABLE"] = self.api.power_available
|
self.data["powerAVAILABLE"] = self.api.power_available
|
||||||
self.data["USAGE"] = round(self.api.usage * 100, 0)
|
self.data["USAGE"] = round(self.api.usage * 100, 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user