Skip to content

Commit

Permalink
Merge pull request #181 from PoppyPop/main
Browse files Browse the repository at this point in the history
Add missing device_class POWER
  • Loading branch information
catsmanac authored Feb 18, 2024
2 parents 08fcdf9 + c7d0ba4 commit eda6a0f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion custom_components/enphase_envoy_custom/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
name="Current Power Production",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="daily_production",
Expand Down Expand Up @@ -74,12 +75,14 @@
name="Current Power Consumption",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="net_consumption",
name="Current Net Power Consumption",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="daily_consumption",
Expand Down Expand Up @@ -114,6 +117,7 @@
name="Inverter",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="batteries",
Expand Down Expand Up @@ -185,6 +189,7 @@
name="Current Power Production L1",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="daily_production_l1",
Expand Down Expand Up @@ -212,6 +217,7 @@
name="Current Power Production L2",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="daily_production_l2",
Expand Down Expand Up @@ -239,6 +245,7 @@
name="Current Power Production L3",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="daily_production_l3",
Expand Down Expand Up @@ -266,12 +273,14 @@
name="Current Power Consumption L1",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="net_consumption_l1",
name="Current Net Power Consumption L1",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="daily_consumption_l1",
Expand Down Expand Up @@ -299,12 +308,14 @@
name="Current Power Consumption L2",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="net_consumption_l2",
name="Current Net Power Consumption L2",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="daily_consumption_l2",
Expand Down Expand Up @@ -332,12 +343,14 @@
name="Current Power Consumption L3",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="net_consumption_l3",
name="Current Net Power Consumption L3",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
SensorEntityDescription(
key="daily_consumption_l3",
Expand Down Expand Up @@ -480,4 +493,4 @@
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
state_class=SensorStateClass.TOTAL,
device_class=SensorDeviceClass.ENERGY
)
)

0 comments on commit eda6a0f

Please sign in to comment.