From 1e809d6d4590051a961f58413f64b2755ce8d6dd Mon Sep 17 00:00:00 2001 From: Sven Bursch-Osewold Date: Sat, 18 May 2024 13:02:34 +0200 Subject: [PATCH] Changed Default Sensors --- custom_components/pysmaplus/sensor.py | 32 ++++++++++----------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/custom_components/pysmaplus/sensor.py b/custom_components/pysmaplus/sensor.py index afeae4c..24956dd 100644 --- a/custom_components/pysmaplus/sensor.py +++ b/custom_components/pysmaplus/sensor.py @@ -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( @@ -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( @@ -91,7 +91,6 @@ 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", @@ -99,7 +98,6 @@ 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", @@ -107,7 +105,6 @@ 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", @@ -115,7 +112,6 @@ 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", @@ -123,6 +119,7 @@ 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", @@ -130,6 +127,7 @@ 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", @@ -182,7 +180,6 @@ 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", @@ -190,7 +187,6 @@ 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", @@ -198,7 +194,6 @@ 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", @@ -314,7 +309,6 @@ 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", @@ -322,7 +316,6 @@ 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", @@ -330,7 +323,6 @@ 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", @@ -352,7 +344,6 @@ 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", @@ -360,7 +351,6 @@ 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", @@ -368,7 +358,6 @@ 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", @@ -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", @@ -411,6 +401,7 @@ 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", @@ -418,6 +409,7 @@ 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", @@ -425,6 +417,7 @@ 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", @@ -432,7 +425,6 @@ 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", @@ -440,7 +432,6 @@ 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", @@ -448,7 +439,6 @@ 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", @@ -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", @@ -631,6 +620,7 @@ 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", @@ -638,6 +628,7 @@ 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", @@ -645,6 +636,7 @@ 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",