Add state_class to Kostal plenticore sensors (#108096)

This commit is contained in:
stegm 2024-01-31 10:37:23 +01:00 committed by GitHub
parent 559f1d77f7
commit 7fe4a343f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,6 +82,7 @@ SENSOR_PROCESS_DATA = [
name="Home Power from Battery",
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
formatter="format_round",
),
PlenticoreSensorEntityDescription(
@ -232,7 +233,7 @@ SENSOR_PROCESS_DATA = [
key="Cycles",
name="Battery Cycles",
icon="mdi:recycle",
state_class=SensorStateClass.MEASUREMENT,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_round",
),
PlenticoreSensorEntityDescription(
@ -324,6 +325,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -332,6 +334,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -340,6 +343,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -357,6 +361,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption from Battery Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -365,6 +370,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption from Battery Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -373,6 +379,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption from Battery Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -390,6 +397,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption from Grid Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -398,6 +406,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption from Grid Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -406,6 +415,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption from Grid Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -423,6 +433,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption from PV Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -431,6 +442,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption from PV Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -439,6 +451,7 @@ SENSOR_PROCESS_DATA = [
name="Home Consumption from PV Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -456,6 +469,7 @@ SENSOR_PROCESS_DATA = [
name="Energy PV1 Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -464,6 +478,7 @@ SENSOR_PROCESS_DATA = [
name="Energy PV1 Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -472,6 +487,7 @@ SENSOR_PROCESS_DATA = [
name="Energy PV1 Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -489,6 +505,7 @@ SENSOR_PROCESS_DATA = [
name="Energy PV2 Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -497,6 +514,7 @@ SENSOR_PROCESS_DATA = [
name="Energy PV2 Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -505,6 +523,7 @@ SENSOR_PROCESS_DATA = [
name="Energy PV2 Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -522,6 +541,7 @@ SENSOR_PROCESS_DATA = [
name="Energy PV3 Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -530,6 +550,7 @@ SENSOR_PROCESS_DATA = [
name="Energy PV3 Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -538,6 +559,7 @@ SENSOR_PROCESS_DATA = [
name="Energy PV3 Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -556,6 +578,7 @@ SENSOR_PROCESS_DATA = [
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
entity_registry_enabled_default=True,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -564,6 +587,7 @@ SENSOR_PROCESS_DATA = [
name="Energy Yield Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -572,6 +596,7 @@ SENSOR_PROCESS_DATA = [
name="Energy Yield Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -589,6 +614,7 @@ SENSOR_PROCESS_DATA = [
name="Battery Charge from Grid Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -597,6 +623,7 @@ SENSOR_PROCESS_DATA = [
name="Battery Charge from Grid Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -605,6 +632,7 @@ SENSOR_PROCESS_DATA = [
name="Battery Charge from Grid Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -622,6 +650,7 @@ SENSOR_PROCESS_DATA = [
name="Battery Charge from PV Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -630,6 +659,7 @@ SENSOR_PROCESS_DATA = [
name="Battery Charge from PV Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -638,6 +668,7 @@ SENSOR_PROCESS_DATA = [
name="Battery Charge from PV Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -655,6 +686,7 @@ SENSOR_PROCESS_DATA = [
name="Battery Discharge Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -663,6 +695,7 @@ SENSOR_PROCESS_DATA = [
name="Battery Discharge Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -671,6 +704,7 @@ SENSOR_PROCESS_DATA = [
name="Battery Discharge Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -688,6 +722,7 @@ SENSOR_PROCESS_DATA = [
name="Energy Discharge to Grid Day",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -696,6 +731,7 @@ SENSOR_PROCESS_DATA = [
name="Energy Discharge to Grid Month",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(
@ -704,6 +740,7 @@ SENSOR_PROCESS_DATA = [
name="Energy Discharge to Grid Year",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
formatter="format_energy",
),
PlenticoreSensorEntityDescription(