Add entity translations to Growatt Server (#95410)

* Add entity translations to Growatt Server

* Fix feedback
This commit is contained in:
Joost Lekkerkerker 2023-06-28 15:28:01 +02:00 committed by GitHub
parent 0a74bffe67
commit 4393aa4f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 535 additions and 134 deletions

View File

@ -138,6 +138,8 @@ async def async_setup_entry(
class GrowattInverter(SensorEntity): class GrowattInverter(SensorEntity):
"""Representation of a Growatt Sensor.""" """Representation of a Growatt Sensor."""
_attr_has_entity_name = True
entity_description: GrowattSensorEntityDescription entity_description: GrowattSensorEntityDescription
def __init__( def __init__(
@ -147,7 +149,6 @@ class GrowattInverter(SensorEntity):
self.probe = probe self.probe = probe
self.entity_description = description self.entity_description = description
self._attr_name = f"{name} {description.name}"
self._attr_unique_id = unique_id self._attr_unique_id = unique_id
self._attr_icon = "mdi:solar-power" self._attr_icon = "mdi:solar-power"

View File

@ -16,7 +16,7 @@ from .sensor_entity_description import GrowattSensorEntityDescription
INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = ( INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_energy_today", key="inverter_energy_today",
name="Energy today", translation_key="inverter_energy_today",
api_key="powerToday", api_key="powerToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -24,7 +24,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_energy_total", key="inverter_energy_total",
name="Lifetime energy output", translation_key="inverter_energy_total",
api_key="powerTotal", api_key="powerTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -33,7 +33,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_voltage_input_1", key="inverter_voltage_input_1",
name="Input 1 voltage", translation_key="inverter_voltage_input_1",
api_key="vpv1", api_key="vpv1",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -41,7 +41,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_amperage_input_1", key="inverter_amperage_input_1",
name="Input 1 Amperage", translation_key="inverter_amperage_input_1",
api_key="ipv1", api_key="ipv1",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -49,7 +49,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_wattage_input_1", key="inverter_wattage_input_1",
name="Input 1 Wattage", translation_key="inverter_wattage_input_1",
api_key="ppv1", api_key="ppv1",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -57,7 +57,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_voltage_input_2", key="inverter_voltage_input_2",
name="Input 2 voltage", translation_key="inverter_voltage_input_2",
api_key="vpv2", api_key="vpv2",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -65,7 +65,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_amperage_input_2", key="inverter_amperage_input_2",
name="Input 2 Amperage", translation_key="inverter_amperage_input_2",
api_key="ipv2", api_key="ipv2",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -73,7 +73,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_wattage_input_2", key="inverter_wattage_input_2",
name="Input 2 Wattage", translation_key="inverter_wattage_input_2",
api_key="ppv2", api_key="ppv2",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -81,7 +81,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_voltage_input_3", key="inverter_voltage_input_3",
name="Input 3 voltage", translation_key="inverter_voltage_input_3",
api_key="vpv3", api_key="vpv3",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -89,7 +89,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_amperage_input_3", key="inverter_amperage_input_3",
name="Input 3 Amperage", translation_key="inverter_amperage_input_3",
api_key="ipv3", api_key="ipv3",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -97,7 +97,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_wattage_input_3", key="inverter_wattage_input_3",
name="Input 3 Wattage", translation_key="inverter_wattage_input_3",
api_key="ppv3", api_key="ppv3",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -105,7 +105,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_internal_wattage", key="inverter_internal_wattage",
name="Internal wattage", translation_key="inverter_internal_wattage",
api_key="ppv", api_key="ppv",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -113,7 +113,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_reactive_voltage", key="inverter_reactive_voltage",
name="Reactive voltage", translation_key="inverter_reactive_voltage",
api_key="vacr", api_key="vacr",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -121,7 +121,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_inverter_reactive_amperage", key="inverter_inverter_reactive_amperage",
name="Reactive amperage", translation_key="inverter_reactive_amperage",
api_key="iacr", api_key="iacr",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -129,7 +129,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_frequency", key="inverter_frequency",
name="AC frequency", translation_key="inverter_frequency",
api_key="fac", api_key="fac",
native_unit_of_measurement=UnitOfFrequency.HERTZ, native_unit_of_measurement=UnitOfFrequency.HERTZ,
device_class=SensorDeviceClass.FREQUENCY, device_class=SensorDeviceClass.FREQUENCY,
@ -137,7 +137,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_current_wattage", key="inverter_current_wattage",
name="Output power", translation_key="inverter_current_wattage",
api_key="pac", api_key="pac",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -145,7 +145,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_current_reactive_wattage", key="inverter_current_reactive_wattage",
name="Reactive wattage", translation_key="inverter_current_reactive_wattage",
api_key="pacr", api_key="pacr",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -153,7 +153,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_ipm_temperature", key="inverter_ipm_temperature",
name="Intelligent Power Management temperature", translation_key="inverter_ipm_temperature",
api_key="ipmTemperature", api_key="ipmTemperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
@ -161,7 +161,7 @@ INVERTER_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="inverter_temperature", key="inverter_temperature",
name="Temperature", translation_key="inverter_energy_today",
api_key="temperature", api_key="temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,

View File

@ -15,21 +15,21 @@ MIX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
# Values from 'mix_info' API call # Values from 'mix_info' API call
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_statement_of_charge", key="mix_statement_of_charge",
name="Statement of charge", translation_key="mix_statement_of_charge",
api_key="capacity", api_key="capacity",
native_unit_of_measurement=PERCENTAGE, native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.BATTERY, device_class=SensorDeviceClass.BATTERY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_battery_charge_today", key="mix_battery_charge_today",
name="Battery charged today", translation_key="mix_battery_charge_today",
api_key="eBatChargeToday", api_key="eBatChargeToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_battery_charge_lifetime", key="mix_battery_charge_lifetime",
name="Lifetime battery charged", translation_key="mix_battery_charge_lifetime",
api_key="eBatChargeTotal", api_key="eBatChargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -37,14 +37,14 @@ MIX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_battery_discharge_today", key="mix_battery_discharge_today",
name="Battery discharged today", translation_key="mix_battery_discharge_today",
api_key="eBatDisChargeToday", api_key="eBatDisChargeToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_battery_discharge_lifetime", key="mix_battery_discharge_lifetime",
name="Lifetime battery discharged", translation_key="mix_battery_discharge_lifetime",
api_key="eBatDisChargeTotal", api_key="eBatDisChargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -52,14 +52,14 @@ MIX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_solar_generation_today", key="mix_solar_generation_today",
name="Solar energy today", translation_key="mix_solar_generation_today",
api_key="epvToday", api_key="epvToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_solar_generation_lifetime", key="mix_solar_generation_lifetime",
name="Lifetime solar energy", translation_key="mix_solar_generation_lifetime",
api_key="epvTotal", api_key="epvTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -67,28 +67,28 @@ MIX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_battery_discharge_w", key="mix_battery_discharge_w",
name="Battery discharging W", translation_key="mix_battery_discharge_w",
api_key="pDischarge1", api_key="pDischarge1",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_battery_voltage", key="mix_battery_voltage",
name="Battery voltage", translation_key="mix_battery_voltage",
api_key="vbat", api_key="vbat",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_pv1_voltage", key="mix_pv1_voltage",
name="PV1 voltage", translation_key="mix_pv1_voltage",
api_key="vpv1", api_key="vpv1",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_pv2_voltage", key="mix_pv2_voltage",
name="PV2 voltage", translation_key="mix_pv2_voltage",
api_key="vpv2", api_key="vpv2",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -96,14 +96,14 @@ MIX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
# Values from 'mix_totals' API call # Values from 'mix_totals' API call
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_load_consumption_today", key="mix_load_consumption_today",
name="Load consumption today", translation_key="mix_load_consumption_today",
api_key="elocalLoadToday", api_key="elocalLoadToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_load_consumption_lifetime", key="mix_load_consumption_lifetime",
name="Lifetime load consumption", translation_key="mix_load_consumption_lifetime",
api_key="elocalLoadTotal", api_key="elocalLoadTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -111,14 +111,14 @@ MIX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_export_to_grid_today", key="mix_export_to_grid_today",
name="Export to grid today", translation_key="mix_export_to_grid_today",
api_key="etoGridToday", api_key="etoGridToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_export_to_grid_lifetime", key="mix_export_to_grid_lifetime",
name="Lifetime export to grid", translation_key="mix_export_to_grid_lifetime",
api_key="etogridTotal", api_key="etogridTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -127,63 +127,63 @@ MIX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
# Values from 'mix_system_status' API call # Values from 'mix_system_status' API call
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_battery_charge", key="mix_battery_charge",
name="Battery charging", translation_key="mix_battery_charge",
api_key="chargePower", api_key="chargePower",
native_unit_of_measurement=UnitOfPower.KILO_WATT, native_unit_of_measurement=UnitOfPower.KILO_WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_load_consumption", key="mix_load_consumption",
name="Load consumption", translation_key="mix_load_consumption",
api_key="pLocalLoad", api_key="pLocalLoad",
native_unit_of_measurement=UnitOfPower.KILO_WATT, native_unit_of_measurement=UnitOfPower.KILO_WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_wattage_pv_1", key="mix_wattage_pv_1",
name="PV1 Wattage", translation_key="mix_wattage_pv_1",
api_key="pPv1", api_key="pPv1",
native_unit_of_measurement=UnitOfPower.KILO_WATT, native_unit_of_measurement=UnitOfPower.KILO_WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_wattage_pv_2", key="mix_wattage_pv_2",
name="PV2 Wattage", translation_key="mix_wattage_pv_2",
api_key="pPv2", api_key="pPv2",
native_unit_of_measurement=UnitOfPower.KILO_WATT, native_unit_of_measurement=UnitOfPower.KILO_WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_wattage_pv_all", key="mix_wattage_pv_all",
name="All PV Wattage", translation_key="mix_wattage_pv_all",
api_key="ppv", api_key="ppv",
native_unit_of_measurement=UnitOfPower.KILO_WATT, native_unit_of_measurement=UnitOfPower.KILO_WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_export_to_grid", key="mix_export_to_grid",
name="Export to grid", translation_key="mix_export_to_grid",
api_key="pactogrid", api_key="pactogrid",
native_unit_of_measurement=UnitOfPower.KILO_WATT, native_unit_of_measurement=UnitOfPower.KILO_WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_import_from_grid", key="mix_import_from_grid",
name="Import from grid", translation_key="mix_import_from_grid",
api_key="pactouser", api_key="pactouser",
native_unit_of_measurement=UnitOfPower.KILO_WATT, native_unit_of_measurement=UnitOfPower.KILO_WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_battery_discharge_kw", key="mix_battery_discharge_kw",
name="Battery discharging kW", translation_key="mix_battery_discharge_kw",
api_key="pdisCharge1", api_key="pdisCharge1",
native_unit_of_measurement=UnitOfPower.KILO_WATT, native_unit_of_measurement=UnitOfPower.KILO_WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_grid_voltage", key="mix_grid_voltage",
name="Grid voltage", translation_key="mix_grid_voltage",
api_key="vAc1", api_key="vAc1",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -191,35 +191,35 @@ MIX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
# Values from 'mix_detail' API call # Values from 'mix_detail' API call
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_system_production_today", key="mix_system_production_today",
name="System production today (self-consumption + export)", translation_key="mix_system_production_today",
api_key="eCharge", api_key="eCharge",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_load_consumption_solar_today", key="mix_load_consumption_solar_today",
name="Load consumption today (solar)", translation_key="mix_load_consumption_solar_today",
api_key="eChargeToday", api_key="eChargeToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_self_consumption_today", key="mix_self_consumption_today",
name="Self consumption today (solar + battery)", translation_key="mix_self_consumption_today",
api_key="eChargeToday1", api_key="eChargeToday1",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_load_consumption_battery_today", key="mix_load_consumption_battery_today",
name="Load consumption today (battery)", translation_key="mix_load_consumption_battery_today",
api_key="echarge1", api_key="echarge1",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_import_from_grid_today", key="mix_import_from_grid_today",
name="Import from grid today (load)", translation_key="mix_import_from_grid_today",
api_key="etouser", api_key="etouser",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -227,14 +227,14 @@ MIX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
# This sensor is manually created using the most recent X-Axis value from the chartData # This sensor is manually created using the most recent X-Axis value from the chartData
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_last_update", key="mix_last_update",
name="Last Data Update", translation_key="mix_last_update",
api_key="lastdataupdate", api_key="lastdataupdate",
device_class=SensorDeviceClass.TIMESTAMP, device_class=SensorDeviceClass.TIMESTAMP,
), ),
# Values from 'dashboard_data' API call # Values from 'dashboard_data' API call
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_import_from_grid_today_combined", key="mix_import_from_grid_today_combined",
name="Import from grid today (load + charging)", translation_key="mix_import_from_grid_today_combined",
api_key="etouser_combined", # This id is not present in the raw API data, it is added by the sensor api_key="etouser_combined", # This id is not present in the raw API data, it is added by the sensor
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,

View File

@ -16,14 +16,14 @@ from .sensor_entity_description import GrowattSensorEntityDescription
STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = ( STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_storage_production_today", key="storage_storage_production_today",
name="Storage production today", translation_key="storage_storage_production_today",
api_key="eBatDisChargeToday", api_key="eBatDisChargeToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_storage_production_lifetime", key="storage_storage_production_lifetime",
name="Lifetime Storage production", translation_key="storage_storage_production_lifetime",
api_key="eBatDisChargeTotal", api_key="eBatDisChargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -31,21 +31,21 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_grid_discharge_today", key="storage_grid_discharge_today",
name="Grid discharged today", translation_key="storage_grid_discharge_today",
api_key="eacDisChargeToday", api_key="eacDisChargeToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_load_consumption_today", key="storage_load_consumption_today",
name="Load consumption today", translation_key="storage_load_consumption_today",
api_key="eopDischrToday", api_key="eopDischrToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_load_consumption_lifetime", key="storage_load_consumption_lifetime",
name="Lifetime load consumption", translation_key="storage_load_consumption_lifetime",
api_key="eopDischrTotal", api_key="eopDischrTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -53,14 +53,14 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_grid_charged_today", key="storage_grid_charged_today",
name="Grid charged today", translation_key="storage_grid_charged_today",
api_key="eacChargeToday", api_key="eacChargeToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_charge_storage_lifetime", key="storage_charge_storage_lifetime",
name="Lifetime storaged charged", translation_key="storage_charge_storage_lifetime",
api_key="eChargeTotal", api_key="eChargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -68,55 +68,55 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_solar_production", key="storage_solar_production",
name="Solar power production", translation_key="storage_solar_production",
api_key="ppv", api_key="ppv",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_battery_percentage", key="storage_battery_percentage",
name="Battery percentage", translation_key="storage_battery_percentage",
api_key="capacity", api_key="capacity",
native_unit_of_measurement=PERCENTAGE, native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.BATTERY, device_class=SensorDeviceClass.BATTERY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_power_flow", key="storage_power_flow",
name="Storage charging/ discharging(-ve)", translation_key="storage_power_flow",
api_key="pCharge", api_key="pCharge",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_load_consumption_solar_storage", key="storage_load_consumption_solar_storage",
name="Load consumption(Solar + Storage)", translation_key="storage_load_consumption_solar_storage",
api_key="rateVA", api_key="rateVA",
native_unit_of_measurement="VA", native_unit_of_measurement="VA",
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_charge_today", key="storage_charge_today",
name="Charge today", translation_key="storage_charge_today",
api_key="eChargeToday", api_key="eChargeToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_import_from_grid", key="storage_import_from_grid",
name="Import from grid", translation_key="storage_import_from_grid",
api_key="pAcInPut", api_key="pAcInPut",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_import_from_grid_today", key="storage_import_from_grid_today",
name="Import from grid today", translation_key="storage_import_from_grid_today",
api_key="eToUserToday", api_key="eToUserToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_import_from_grid_total", key="storage_import_from_grid_total",
name="Import from grid total", translation_key="storage_import_from_grid_total",
api_key="eToUserTotal", api_key="eToUserTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -124,14 +124,14 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_load_consumption", key="storage_load_consumption",
name="Load consumption", translation_key="storage_load_consumption",
api_key="outPutPower", api_key="outPutPower",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_grid_voltage", key="storage_grid_voltage",
name="AC input voltage", translation_key="storage_grid_voltage",
api_key="vGrid", api_key="vGrid",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -139,7 +139,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_pv_charging_voltage", key="storage_pv_charging_voltage",
name="PV charging voltage", translation_key="storage_pv_charging_voltage",
api_key="vpv", api_key="vpv",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -147,7 +147,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_ac_input_frequency_out", key="storage_ac_input_frequency_out",
name="AC input frequency", translation_key="storage_ac_input_frequency_out",
api_key="freqOutPut", api_key="freqOutPut",
native_unit_of_measurement=UnitOfFrequency.HERTZ, native_unit_of_measurement=UnitOfFrequency.HERTZ,
device_class=SensorDeviceClass.FREQUENCY, device_class=SensorDeviceClass.FREQUENCY,
@ -155,7 +155,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_output_voltage", key="storage_output_voltage",
name="Output voltage", translation_key="storage_output_voltage",
api_key="outPutVolt", api_key="outPutVolt",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -163,7 +163,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_ac_output_frequency", key="storage_ac_output_frequency",
name="Ac output frequency", translation_key="storage_ac_output_frequency",
api_key="freqGrid", api_key="freqGrid",
native_unit_of_measurement=UnitOfFrequency.HERTZ, native_unit_of_measurement=UnitOfFrequency.HERTZ,
device_class=SensorDeviceClass.FREQUENCY, device_class=SensorDeviceClass.FREQUENCY,
@ -171,7 +171,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_current_PV", key="storage_current_PV",
name="Solar charge current", translation_key="storage_current_pv",
api_key="iAcCharge", api_key="iAcCharge",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -179,7 +179,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_current_1", key="storage_current_1",
name="Solar current to storage", translation_key="storage_current_1",
api_key="iChargePV1", api_key="iChargePV1",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -187,7 +187,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_grid_amperage_input", key="storage_grid_amperage_input",
name="Grid charge current", translation_key="storage_grid_amperage_input",
api_key="chgCurr", api_key="chgCurr",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -195,7 +195,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_grid_out_current", key="storage_grid_out_current",
name="Grid out current", translation_key="storage_grid_out_current",
api_key="outPutCurrent", api_key="outPutCurrent",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -203,7 +203,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_battery_voltage", key="storage_battery_voltage",
name="Battery voltage", translation_key="storage_battery_voltage",
api_key="vBat", api_key="vBat",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -211,7 +211,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="storage_load_percentage", key="storage_load_percentage",
name="Load percentage", translation_key="storage_load_percentage",
api_key="loadPercent", api_key="loadPercent",
native_unit_of_measurement=PERCENTAGE, native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.BATTERY, device_class=SensorDeviceClass.BATTERY,

View File

@ -20,7 +20,7 @@ from .sensor_entity_description import GrowattSensorEntityDescription
TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = ( TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_today", key="tlx_energy_today",
name="Energy today", translation_key="tlx_energy_today",
api_key="eacToday", api_key="eacToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -29,7 +29,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_total", key="tlx_energy_total",
name="Lifetime energy output", translation_key="tlx_energy_total",
api_key="eacTotal", api_key="eacTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -39,7 +39,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_total_input_1", key="tlx_energy_total_input_1",
name="Lifetime total energy input 1", translation_key="tlx_energy_total_input_1",
api_key="epv1Total", api_key="epv1Total",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -49,7 +49,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_today_input_1", key="tlx_energy_today_input_1",
name="Energy Today Input 1", translation_key="tlx_energy_today_input_1",
api_key="epv1Today", api_key="epv1Today",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -58,7 +58,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_voltage_input_1", key="tlx_voltage_input_1",
name="Input 1 voltage", translation_key="tlx_voltage_input_1",
api_key="vpv1", api_key="vpv1",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -66,7 +66,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_amperage_input_1", key="tlx_amperage_input_1",
name="Input 1 Amperage", translation_key="tlx_amperage_input_1",
api_key="ipv1", api_key="ipv1",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -74,7 +74,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_wattage_input_1", key="tlx_wattage_input_1",
name="Input 1 Wattage", translation_key="tlx_wattage_input_1",
api_key="ppv1", api_key="ppv1",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -82,7 +82,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_total_input_2", key="tlx_energy_total_input_2",
name="Lifetime total energy input 2", translation_key="tlx_energy_total_input_2",
api_key="epv2Total", api_key="epv2Total",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -92,7 +92,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_today_input_2", key="tlx_energy_today_input_2",
name="Energy Today Input 2", translation_key="tlx_energy_today_input_2",
api_key="epv2Today", api_key="epv2Today",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -101,7 +101,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_voltage_input_2", key="tlx_voltage_input_2",
name="Input 2 voltage", translation_key="tlx_voltage_input_2",
api_key="vpv2", api_key="vpv2",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -109,7 +109,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_amperage_input_2", key="tlx_amperage_input_2",
name="Input 2 Amperage", translation_key="tlx_amperage_input_2",
api_key="ipv2", api_key="ipv2",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -117,7 +117,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_wattage_input_2", key="tlx_wattage_input_2",
name="Input 2 Wattage", translation_key="tlx_wattage_input_2",
api_key="ppv2", api_key="ppv2",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -125,7 +125,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_total_input_3", key="tlx_energy_total_input_3",
name="Lifetime total energy input 3", translation_key="tlx_energy_total_input_3",
api_key="epv3Total", api_key="epv3Total",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -135,7 +135,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_today_input_3", key="tlx_energy_today_input_3",
name="Energy Today Input 3", translation_key="tlx_energy_today_input_3",
api_key="epv3Today", api_key="epv3Today",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -144,7 +144,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_voltage_input_3", key="tlx_voltage_input_3",
name="Input 3 voltage", translation_key="tlx_voltage_input_3",
api_key="vpv3", api_key="vpv3",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -152,7 +152,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_amperage_input_3", key="tlx_amperage_input_3",
name="Input 3 Amperage", translation_key="tlx_amperage_input_3",
api_key="ipv3", api_key="ipv3",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -160,7 +160,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_wattage_input_3", key="tlx_wattage_input_3",
name="Input 3 Wattage", translation_key="tlx_wattage_input_3",
api_key="ppv3", api_key="ppv3",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -168,7 +168,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_total_input_4", key="tlx_energy_total_input_4",
name="Lifetime total energy input 4", translation_key="tlx_energy_total_input_4",
api_key="epv4Total", api_key="epv4Total",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -178,7 +178,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_energy_today_input_4", key="tlx_energy_today_input_4",
name="Energy Today Input 4", translation_key="tlx_energy_today_input_4",
api_key="epv4Today", api_key="epv4Today",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -187,7 +187,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_voltage_input_4", key="tlx_voltage_input_4",
name="Input 4 voltage", translation_key="tlx_voltage_input_4",
api_key="vpv4", api_key="vpv4",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -195,7 +195,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_amperage_input_4", key="tlx_amperage_input_4",
name="Input 4 Amperage", translation_key="tlx_amperage_input_4",
api_key="ipv4", api_key="ipv4",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT, device_class=SensorDeviceClass.CURRENT,
@ -203,7 +203,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_wattage_input_4", key="tlx_wattage_input_4",
name="Input 4 Wattage", translation_key="tlx_wattage_input_4",
api_key="ppv4", api_key="ppv4",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -211,7 +211,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_solar_generation_total", key="tlx_solar_generation_total",
name="Lifetime total solar energy", translation_key="tlx_solar_generation_total",
api_key="epvTotal", api_key="epvTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -220,7 +220,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_internal_wattage", key="tlx_internal_wattage",
name="Internal wattage", translation_key="tlx_internal_wattage",
api_key="ppv", api_key="ppv",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -228,7 +228,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_reactive_voltage", key="tlx_reactive_voltage",
name="Reactive voltage", translation_key="tlx_reactive_voltage",
api_key="vacrs", api_key="vacrs",
native_unit_of_measurement=UnitOfElectricPotential.VOLT, native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE, device_class=SensorDeviceClass.VOLTAGE,
@ -236,7 +236,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_frequency", key="tlx_frequency",
name="AC frequency", translation_key="tlx_frequency",
api_key="fac", api_key="fac",
native_unit_of_measurement=UnitOfFrequency.HERTZ, native_unit_of_measurement=UnitOfFrequency.HERTZ,
device_class=SensorDeviceClass.FREQUENCY, device_class=SensorDeviceClass.FREQUENCY,
@ -244,7 +244,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_current_wattage", key="tlx_current_wattage",
name="Output power", translation_key="tlx_current_wattage",
api_key="pac", api_key="pac",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
@ -252,7 +252,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_temperature_1", key="tlx_temperature_1",
name="Temperature 1", translation_key="tlx_temperature_1",
api_key="temp1", api_key="temp1",
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
@ -260,7 +260,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_temperature_2", key="tlx_temperature_2",
name="Temperature 2", translation_key="tlx_temperature_2",
api_key="temp2", api_key="temp2",
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
@ -268,7 +268,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_temperature_3", key="tlx_temperature_3",
name="Temperature 3", translation_key="tlx_temperature_3",
api_key="temp3", api_key="temp3",
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
@ -276,7 +276,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_temperature_4", key="tlx_temperature_4",
name="Temperature 4", translation_key="tlx_temperature_4",
api_key="temp4", api_key="temp4",
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
@ -284,7 +284,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_temperature_5", key="tlx_temperature_5",
name="Temperature 5", translation_key="tlx_temperature_5",
api_key="temp5", api_key="temp5",
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
@ -292,7 +292,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_all_batteries_discharge_today", key="tlx_all_batteries_discharge_today",
name="All batteries discharged today", translation_key="tlx_all_batteries_discharge_today",
api_key="edischargeToday", api_key="edischargeToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -300,7 +300,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_all_batteries_discharge_total", key="tlx_all_batteries_discharge_total",
name="Lifetime total all batteries discharged", translation_key="tlx_all_batteries_discharge_total",
api_key="edischargeTotal", api_key="edischargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -309,14 +309,14 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_battery_1_discharge_w", key="tlx_battery_1_discharge_w",
name="Battery 1 discharging W", translation_key="tlx_battery_1_discharge_w",
api_key="bdc1DischargePower", api_key="bdc1DischargePower",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_battery_1_discharge_total", key="tlx_battery_1_discharge_total",
name="Lifetime total battery 1 discharged", translation_key="tlx_battery_1_discharge_total",
api_key="bdc1DischargeTotal", api_key="bdc1DischargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -325,14 +325,14 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_battery_2_discharge_w", key="tlx_battery_2_discharge_w",
name="Battery 2 discharging W", translation_key="tlx_battery_2_discharge_w",
api_key="bdc1DischargePower", api_key="bdc1DischargePower",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_battery_2_discharge_total", key="tlx_battery_2_discharge_total",
name="Lifetime total battery 2 discharged", translation_key="tlx_battery_2_discharge_total",
api_key="bdc1DischargeTotal", api_key="bdc1DischargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -341,7 +341,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_all_batteries_charge_today", key="tlx_all_batteries_charge_today",
name="All batteries charged today", translation_key="tlx_all_batteries_charge_today",
api_key="echargeToday", api_key="echargeToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -349,7 +349,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_all_batteries_charge_total", key="tlx_all_batteries_charge_total",
name="Lifetime total all batteries charged", translation_key="tlx_all_batteries_charge_total",
api_key="echargeTotal", api_key="echargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -358,14 +358,14 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_battery_1_charge_w", key="tlx_battery_1_charge_w",
name="Battery 1 charging W", translation_key="tlx_battery_1_charge_w",
api_key="bdc1ChargePower", api_key="bdc1ChargePower",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_battery_1_charge_total", key="tlx_battery_1_charge_total",
name="Lifetime total battery 1 charged", translation_key="tlx_battery_1_charge_total",
api_key="bdc1ChargeTotal", api_key="bdc1ChargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -374,14 +374,14 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_battery_2_charge_w", key="tlx_battery_2_charge_w",
name="Battery 2 charging W", translation_key="tlx_battery_2_charge_w",
api_key="bdc1ChargePower", api_key="bdc1ChargePower",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_battery_2_charge_total", key="tlx_battery_2_charge_total",
name="Lifetime total battery 2 charged", translation_key="tlx_battery_2_charge_total",
api_key="bdc1ChargeTotal", api_key="bdc1ChargeTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -390,7 +390,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_export_to_grid_today", key="tlx_export_to_grid_today",
name="Export to grid today", translation_key="tlx_export_to_grid_today",
api_key="etoGridToday", api_key="etoGridToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -398,7 +398,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_export_to_grid_total", key="tlx_export_to_grid_total",
name="Lifetime total export to grid", translation_key="tlx_export_to_grid_total",
api_key="etoGridTotal", api_key="etoGridTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -407,7 +407,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_load_consumption_today", key="tlx_load_consumption_today",
name="Load consumption today", translation_key="tlx_load_consumption_today",
api_key="elocalLoadToday", api_key="elocalLoadToday",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -415,7 +415,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="mix_load_consumption_total", key="mix_load_consumption_total",
name="Lifetime total load consumption", translation_key="mix_load_consumption_total",
api_key="elocalLoadTotal", api_key="elocalLoadTotal",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -424,7 +424,7 @@ TLX_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="tlx_statement_of_charge", key="tlx_statement_of_charge",
name="Statement of charge (SoC)", translation_key="tlx_statement_of_charge",
api_key="bmsSoc", api_key="bmsSoc",
native_unit_of_measurement=PERCENTAGE, native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.BATTERY, device_class=SensorDeviceClass.BATTERY,

View File

@ -9,33 +9,33 @@ from .sensor_entity_description import GrowattSensorEntityDescription
TOTAL_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = ( TOTAL_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="total_money_today", key="total_money_today",
name="Total money today", translation_key="total_money_today",
api_key="plantMoneyText", api_key="plantMoneyText",
currency=True, currency=True,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="total_money_total", key="total_money_total",
name="Money lifetime", translation_key="total_money_total",
api_key="totalMoneyText", api_key="totalMoneyText",
currency=True, currency=True,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="total_energy_today", key="total_energy_today",
name="Energy Today", translation_key="total_energy_today",
api_key="todayEnergy", api_key="todayEnergy",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="total_output_power", key="total_output_power",
name="Output Power", translation_key="total_output_power",
api_key="invTodayPpv", api_key="invTodayPpv",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="total_energy_output", key="total_energy_output",
name="Lifetime energy output", translation_key="total_energy_output",
api_key="totalEnergy", api_key="totalEnergy",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
@ -43,7 +43,7 @@ TOTAL_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = (
), ),
GrowattSensorEntityDescription( GrowattSensorEntityDescription(
key="total_maximum_output", key="total_maximum_output",
name="Maximum power", translation_key="total_maximum_output",
api_key="nominalPower", api_key="nominalPower",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,

View File

@ -25,5 +25,405 @@
} }
} }
}, },
"title": "Growatt Server" "title": "Growatt Server",
"entity": {
"sensor": {
"inverter_energy_today": {
"name": "Energy today"
},
"inverter_energy_total": {
"name": "Lifetime energy output"
},
"inverter_voltage_input_1": {
"name": "Input 1 voltage"
},
"inverter_amperage_input_1": {
"name": "Input 1 Amperage"
},
"inverter_wattage_input_1": {
"name": "Input 1 Wattage"
},
"inverter_voltage_input_2": {
"name": "Input 2 voltage"
},
"inverter_amperage_input_2": {
"name": "Input 2 Amperage"
},
"inverter_wattage_input_2": {
"name": "Input 2 Wattage"
},
"inverter_voltage_input_3": {
"name": "Input 3 voltage"
},
"inverter_amperage_input_3": {
"name": "Input 3 Amperage"
},
"inverter_wattage_input_3": {
"name": "Input 3 Wattage"
},
"inverter_internal_wattage": {
"name": "Internal wattage"
},
"inverter_reactive_voltage": {
"name": "Reactive voltage"
},
"inverter_reactive_amperage": {
"name": "Reactive amperage"
},
"inverter_frequency": {
"name": "AC frequency"
},
"inverter_current_wattage": {
"name": "Output power"
},
"inverter_current_reactive_wattage": {
"name": "Reactive wattage"
},
"inverter_ipm_temperature": {
"name": "Intelligent Power Management temperature"
},
"inverter_temperature": {
"name": "Energytoday"
},
"mix_statement_of_charge": {
"name": "Statement of charge"
},
"mix_battery_charge_today": {
"name": "Battery charged today"
},
"mix_battery_charge_lifetime": {
"name": "Lifetime battery charged"
},
"mix_battery_discharge_today": {
"name": "Battery discharged today"
},
"mix_battery_discharge_lifetime": {
"name": "Lifetime battery discharged"
},
"mix_solar_generation_today": {
"name": "Solar energy today"
},
"mix_solar_generation_lifetime": {
"name": "Lifetime solar energy"
},
"mix_battery_discharge_w": {
"name": "Battery discharging W"
},
"mix_battery_voltage": {
"name": "Battery voltage"
},
"mix_pv1_voltage": {
"name": "PV1 voltage"
},
"mix_pv2_voltage": {
"name": "PV2 voltage"
},
"mix_load_consumption_today": {
"name": "Load consumption today"
},
"mix_load_consumption_lifetime": {
"name": "Lifetime load consumption"
},
"mix_export_to_grid_today": {
"name": "Export to grid today"
},
"mix_export_to_grid_lifetime": {
"name": "Lifetime export to grid"
},
"mix_battery_charge": {
"name": "Battery charging"
},
"mix_load_consumption": {
"name": "Load consumption"
},
"mix_wattage_pv_1": {
"name": "PV1 Wattage"
},
"mix_wattage_pv_2": {
"name": "PV2 Wattage"
},
"mix_wattage_pv_all": {
"name": "All PV Wattage"
},
"mix_export_to_grid": {
"name": "Export to grid"
},
"mix_import_from_grid": {
"name": "Import from grid"
},
"mix_battery_discharge_kw": {
"name": "Battery discharging kW"
},
"mix_grid_voltage": {
"name": "Grid voltage"
},
"mix_system_production_today": {
"name": "System production today (self-consumption + export)"
},
"mix_load_consumption_solar_today": {
"name": "Load consumption today (solar)"
},
"mix_self_consumption_today": {
"name": "Self consumption today (solar + battery)"
},
"mix_load_consumption_battery_today": {
"name": "Load consumption today (battery)"
},
"mix_import_from_grid_today": {
"name": "Import from grid today (load)"
},
"mix_last_update": {
"name": "Last Data Update"
},
"mix_import_from_grid_today_combined": {
"name": "Import from grid today (load + charging)"
},
"storage_storage_production_today": {
"name": "Storage production today"
},
"storage_storage_production_lifetime": {
"name": "Lifetime Storage production"
},
"storage_grid_discharge_today": {
"name": "Grid discharged today"
},
"storage_load_consumption_today": {
"name": "Load consumption today"
},
"storage_load_consumption_lifetime": {
"name": "Lifetime load consumption"
},
"storage_grid_charged_today": {
"name": "Grid charged today"
},
"storage_charge_storage_lifetime": {
"name": "Lifetime stored charged"
},
"storage_solar_production": {
"name": "Solar power production"
},
"storage_battery_percentage": {
"name": "Battery percentage"
},
"storage_power_flow": {
"name": "Storage charging/ discharging(-ve)"
},
"storage_load_consumption_solar_storage": {
"name": "Load consumption (Solar + Storage)"
},
"storage_charge_today": {
"name": "Charge today"
},
"storage_import_from_grid": {
"name": "Import from grid"
},
"storage_import_from_grid_today": {
"name": "Import from grid today"
},
"storage_import_from_grid_total": {
"name": "Import from grid total"
},
"storage_load_consumption": {
"name": "Load consumption"
},
"storage_grid_voltage": {
"name": "AC input voltage"
},
"storage_pv_charging_voltage": {
"name": "PV charging voltage"
},
"storage_ac_input_frequency_out": {
"name": "AC input frequency"
},
"storage_output_voltage": {
"name": "Output voltage"
},
"storage_ac_output_frequency": {
"name": "Ac output frequency"
},
"storage_current_pv": {
"name": "Solar charge current"
},
"storage_current_1": {
"name": "Solar current to storage"
},
"storage_grid_amperage_input": {
"name": "Grid charge current"
},
"storage_grid_out_current": {
"name": "Grid out current"
},
"storage_battery_voltage": {
"name": "Battery voltage"
},
"storage_load_percentage": {
"name": "Load percentage"
},
"tlx_energy_today": {
"name": "Energy today"
},
"tlx_energy_total": {
"name": "Lifetime energy output"
},
"tlx_energy_total_input_1": {
"name": "Lifetime total energy input 1"
},
"tlx_energy_today_input_1": {
"name": "Energy Today Input 1"
},
"tlx_voltage_input_1": {
"name": "Input 1 voltage"
},
"tlx_amperage_input_1": {
"name": "Input 1 Amperage"
},
"tlx_wattage_input_1": {
"name": "Input 1 Wattage"
},
"tlx_energy_total_input_2": {
"name": "Lifetime total energy input 2"
},
"tlx_energy_today_input_2": {
"name": "Energy Today Input 2"
},
"tlx_voltage_input_2": {
"name": "Input 2 voltage"
},
"tlx_amperage_input_2": {
"name": "Input 2 Amperage"
},
"tlx_wattage_input_2": {
"name": "Input 2 Wattage"
},
"tlx_energy_total_input_3": {
"name": "Lifetime total energy input 3"
},
"tlx_energy_today_input_3": {
"name": "Energy Today Input 3"
},
"tlx_voltage_input_3": {
"name": "Input 3 voltage"
},
"tlx_amperage_input_3": {
"name": "Input 3 Amperage"
},
"tlx_wattage_input_3": {
"name": "Input 3 Wattage"
},
"tlx_energy_total_input_4": {
"name": "Lifetime total energy input 4"
},
"tlx_energy_today_input_4": {
"name": "Energy Today Input 4"
},
"tlx_voltage_input_4": {
"name": "Input 4 voltage"
},
"tlx_amperage_input_4": {
"name": "Input 4 Amperage"
},
"tlx_wattage_input_4": {
"name": "Input 4 Wattage"
},
"tlx_solar_generation_total": {
"name": "Lifetime total solar energy"
},
"tlx_internal_wattage": {
"name": "Internal wattage"
},
"tlx_reactive_voltage": {
"name": "Reactive voltage"
},
"tlx_frequency": {
"name": "AC frequency"
},
"tlx_current_wattage": {
"name": "Output power"
},
"tlx_temperature_1": {
"name": "Temperature 1"
},
"tlx_temperature_2": {
"name": "Temperature 2"
},
"tlx_temperature_3": {
"name": "Temperature 3"
},
"tlx_temperature_4": {
"name": "Temperature 4"
},
"tlx_temperature_5": {
"name": "Temperature 5"
},
"tlx_all_batteries_discharge_today": {
"name": "All batteries discharged today"
},
"tlx_all_batteries_discharge_total": {
"name": "Lifetime total all batteries discharged"
},
"tlx_battery_1_discharge_w": {
"name": "Battery 1 discharging W"
},
"tlx_battery_1_discharge_total": {
"name": "Lifetime total battery 1 discharged"
},
"tlx_battery_2_discharge_w": {
"name": "Battery 2 discharging W"
},
"tlx_battery_2_discharge_total": {
"name": "Lifetime total battery 2 discharged"
},
"tlx_all_batteries_charge_today": {
"name": "All batteries charged today"
},
"tlx_all_batteries_charge_total": {
"name": "Lifetime total all batteries charged"
},
"tlx_battery_1_charge_w": {
"name": "Battery 1 charging W"
},
"tlx_battery_1_charge_total": {
"name": "Lifetime total battery 1 charged"
},
"tlx_battery_2_charge_w": {
"name": "Battery 2 charging W"
},
"tlx_battery_2_charge_total": {
"name": "Lifetime total battery 2 charged"
},
"tlx_export_to_grid_today": {
"name": "Export to grid today"
},
"tlx_export_to_grid_total": {
"name": "Lifetime total export to grid"
},
"tlx_load_consumption_today": {
"name": "Load consumption today"
},
"mix_load_consumption_total": {
"name": "Lifetime total load consumption"
},
"tlx_statement_of_charge": {
"name": "Statement of charge (SoC)"
},
"total_money_today": {
"name": "Total money today"
},
"total_money_total": {
"name": "Money lifetime"
},
"total_energy_today": {
"name": "Energy Today"
},
"total_output_power": {
"name": "Output Power"
},
"total_energy_output": {
"name": "Lifetime energy output"
},
"total_maximum_output": {
"name": "Maximum power"
}
}
}
} }