Skip to content

Commit

Permalink
Changed Default Sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
littleyoda committed May 18, 2024
1 parent 6785507 commit 1e809d6
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions custom_components/pysmaplus/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
"operating_status_general": SensorEntityDescription(
key="operating_status_general",
name="Operating Status General",
entity_registry_enabled_default=False,
entity_registry_enabled_default=True,
entity_category=EntityCategory.DIAGNOSTIC,
),
"inverter_condition": SensorEntityDescription(
key="inverter_condition",
name="Inverter Condition",
entity_registry_enabled_default=False,
entity_registry_enabled_default=True,
entity_category=EntityCategory.DIAGNOSTIC,
),
"inverter_system_init": SensorEntityDescription(
Expand All @@ -62,7 +62,7 @@
"grid_connection_status": SensorEntityDescription(
key="grid_connection_status",
name="Grid Connection Status",
entity_registry_enabled_default=False,
entity_registry_enabled_default=True,
entity_category=EntityCategory.DIAGNOSTIC,
),
"grid_relay_status": SensorEntityDescription(
Expand Down Expand Up @@ -91,45 +91,43 @@
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
entity_registry_enabled_default=False,
),
"pv_voltage_a": SensorEntityDescription(
key="pv_voltage_a",
name="PV Voltage A",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
entity_registry_enabled_default=False,
),
"pv_voltage_b": SensorEntityDescription(
key="pv_voltage_b",
name="PV Voltage B",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
entity_registry_enabled_default=False,
),
"pv_voltage_c": SensorEntityDescription(
key="pv_voltage_c",
name="PV Voltage C",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
entity_registry_enabled_default=False,
),
"pv_current_a": SensorEntityDescription(
key="pv_current_a",
name="PV Current A",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
entity_registry_enabled_default=False,
),
"pv_current_b": SensorEntityDescription(
key="pv_current_b",
name="PV Current B",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
entity_registry_enabled_default=False,
),
"pv_current_c": SensorEntityDescription(
key="pv_current_c",
Expand Down Expand Up @@ -182,23 +180,20 @@
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
entity_registry_enabled_default=False,
),
"power_l2": SensorEntityDescription(
key="power_l2",
name="Power L2",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
entity_registry_enabled_default=False,
),
"power_l3": SensorEntityDescription(
key="power_l3",
name="Power L3",
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
entity_registry_enabled_default=False,
),
"grid_reactive_power": SensorEntityDescription(
key="grid_reactive_power",
Expand Down Expand Up @@ -314,23 +309,20 @@
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
entity_registry_enabled_default=False,
),
"voltage_l2": SensorEntityDescription(
key="voltage_l2",
name="Voltage L2",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
entity_registry_enabled_default=False,
),
"voltage_l3": SensorEntityDescription(
key="voltage_l3",
name="Voltage L3",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
entity_registry_enabled_default=False,
),
"total_yield": SensorEntityDescription(
key="total_yield",
Expand All @@ -352,23 +344,20 @@
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.TEMPERATURE,
entity_registry_enabled_default=True,
),
"temp_b": SensorEntityDescription(
key="temp_b",
name="Temp B",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.TEMPERATURE,
entity_registry_enabled_default=True,
),
"temp_c": SensorEntityDescription(
key="temp_c",
name="Temp C",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.TEMPERATURE,
entity_registry_enabled_default=True,
),
"metering_power_supplied": SensorEntityDescription(
key="metering_power_supplied",
Expand All @@ -390,6 +379,7 @@
native_unit_of_measurement=UnitOfFrequency.HERTZ,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.FREQUENCY,
entity_registry_enabled_default=False,
),
"metering_total_yield": SensorEntityDescription(
key="metering_total_yield",
Expand All @@ -411,44 +401,44 @@
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
entity_registry_enabled_default=False,
),
"metering_current_l2": SensorEntityDescription(
key="metering_current_l2",
name="Metering Current L2",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
entity_registry_enabled_default=False,
),
"metering_current_l3": SensorEntityDescription(
key="metering_current_l3",
name="Metering Current L3",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
entity_registry_enabled_default=False,
),
"metering_voltage_l1": SensorEntityDescription(
key="metering_voltage_l1",
name="Metering Voltage L1",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
entity_registry_enabled_default=False,
),
"metering_voltage_l2": SensorEntityDescription(
key="metering_voltage_l2",
name="Metering Voltage L2",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
entity_registry_enabled_default=False,
),
"metering_voltage_l3": SensorEntityDescription(
key="metering_voltage_l3",
name="Metering Voltage L3",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
entity_registry_enabled_default=False,
),
"metering_active_power_feed_l1": SensorEntityDescription(
key="metering_active_power_feed_l1",
Expand Down Expand Up @@ -506,7 +496,6 @@
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.ENERGY,
entity_registry_enabled_default=False,
),
"pv_gen_meter": SensorEntityDescription(
key="pv_gen_meter",
Expand Down Expand Up @@ -631,20 +620,23 @@
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
entity_registry_enabled_default=False,
),
"battery_current_b": SensorEntityDescription(
key="battery_current_b",
name="Battery Current B",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
entity_registry_enabled_default=False,
),
"battery_current_c": SensorEntityDescription(
key="battery_current_c",
name="Battery Current C",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
entity_registry_enabled_default=False,
),
"battery_temp_a": SensorEntityDescription(
key="battery_temp_a",
Expand Down

0 comments on commit 1e809d6

Please sign in to comment.