Skip to content

Commit 01dee65

Browse files
johanzanderjoostlekCopilot
authored
Add 14 additional sensor entities for Growatt TLX/MIN inverters (home-assistant#153964)
Co-authored-by: Joost Lekkerkerker <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 04f83bc commit 01dee65

File tree

2 files changed

+167
-0
lines changed

2 files changed

+167
-0
lines changed

homeassistant/components/growatt_server/sensor/tlx.py

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,15 @@
210210
device_class=SensorDeviceClass.POWER,
211211
precision=1,
212212
),
213+
GrowattSensorEntityDescription(
214+
key="tlx_solar_generation_today",
215+
translation_key="tlx_solar_generation_today",
216+
api_key="epvToday",
217+
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
218+
device_class=SensorDeviceClass.ENERGY,
219+
state_class=SensorStateClass.TOTAL_INCREASING,
220+
precision=1,
221+
),
213222
GrowattSensorEntityDescription(
214223
key="tlx_solar_generation_total",
215224
translation_key="tlx_solar_generation_total",
@@ -430,4 +439,120 @@
430439
native_unit_of_measurement=PERCENTAGE,
431440
device_class=SensorDeviceClass.BATTERY,
432441
),
442+
GrowattSensorEntityDescription(
443+
key="tlx_pac_to_local_load",
444+
translation_key="tlx_pac_to_local_load",
445+
api_key="pacToLocalLoad",
446+
native_unit_of_measurement=UnitOfPower.WATT,
447+
device_class=SensorDeviceClass.POWER,
448+
precision=1,
449+
),
450+
GrowattSensorEntityDescription(
451+
key="tlx_pac_to_user_total",
452+
translation_key="tlx_pac_to_user_total",
453+
api_key="pacToUserTotal",
454+
native_unit_of_measurement=UnitOfPower.WATT,
455+
device_class=SensorDeviceClass.POWER,
456+
precision=1,
457+
),
458+
GrowattSensorEntityDescription(
459+
key="tlx_pac_to_grid_total",
460+
translation_key="tlx_pac_to_grid_total",
461+
api_key="pacToGridTotal",
462+
native_unit_of_measurement=UnitOfPower.WATT,
463+
device_class=SensorDeviceClass.POWER,
464+
precision=1,
465+
),
466+
GrowattSensorEntityDescription(
467+
key="tlx_system_production_today",
468+
translation_key="tlx_system_production_today",
469+
api_key="esystemToday",
470+
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
471+
device_class=SensorDeviceClass.ENERGY,
472+
state_class=SensorStateClass.TOTAL_INCREASING,
473+
precision=1,
474+
),
475+
GrowattSensorEntityDescription(
476+
key="tlx_system_production_total",
477+
translation_key="tlx_system_production_total",
478+
api_key="esystemTotal",
479+
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
480+
device_class=SensorDeviceClass.ENERGY,
481+
state_class=SensorStateClass.TOTAL_INCREASING,
482+
never_resets=True,
483+
precision=1,
484+
),
485+
GrowattSensorEntityDescription(
486+
key="tlx_self_consumption_today",
487+
translation_key="tlx_self_consumption_today",
488+
api_key="eselfToday",
489+
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
490+
device_class=SensorDeviceClass.ENERGY,
491+
state_class=SensorStateClass.TOTAL_INCREASING,
492+
precision=1,
493+
),
494+
GrowattSensorEntityDescription(
495+
key="tlx_self_consumption_total",
496+
translation_key="tlx_self_consumption_total",
497+
api_key="eselfTotal",
498+
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
499+
device_class=SensorDeviceClass.ENERGY,
500+
state_class=SensorStateClass.TOTAL_INCREASING,
501+
never_resets=True,
502+
precision=1,
503+
),
504+
GrowattSensorEntityDescription(
505+
key="tlx_import_from_grid_today",
506+
translation_key="tlx_import_from_grid_today",
507+
api_key="etoUserToday",
508+
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
509+
device_class=SensorDeviceClass.ENERGY,
510+
state_class=SensorStateClass.TOTAL_INCREASING,
511+
precision=1,
512+
),
513+
GrowattSensorEntityDescription(
514+
key="tlx_import_from_grid_total",
515+
translation_key="tlx_import_from_grid_total",
516+
api_key="etoUserTotal",
517+
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
518+
device_class=SensorDeviceClass.ENERGY,
519+
state_class=SensorStateClass.TOTAL_INCREASING,
520+
never_resets=True,
521+
precision=1,
522+
),
523+
GrowattSensorEntityDescription(
524+
key="tlx_batteries_charged_from_grid_today",
525+
translation_key="tlx_batteries_charged_from_grid_today",
526+
api_key="eacChargeToday",
527+
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
528+
device_class=SensorDeviceClass.ENERGY,
529+
state_class=SensorStateClass.TOTAL_INCREASING,
530+
precision=1,
531+
),
532+
GrowattSensorEntityDescription(
533+
key="tlx_batteries_charged_from_grid_total",
534+
translation_key="tlx_batteries_charged_from_grid_total",
535+
api_key="eacChargeTotal",
536+
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
537+
device_class=SensorDeviceClass.ENERGY,
538+
state_class=SensorStateClass.TOTAL_INCREASING,
539+
never_resets=True,
540+
precision=1,
541+
),
542+
GrowattSensorEntityDescription(
543+
key="tlx_p_system",
544+
translation_key="tlx_p_system",
545+
api_key="psystem",
546+
native_unit_of_measurement=UnitOfPower.WATT,
547+
device_class=SensorDeviceClass.POWER,
548+
precision=1,
549+
),
550+
GrowattSensorEntityDescription(
551+
key="tlx_p_self",
552+
translation_key="tlx_p_self",
553+
api_key="pself",
554+
native_unit_of_measurement=UnitOfPower.WATT,
555+
device_class=SensorDeviceClass.POWER,
556+
precision=1,
557+
),
433558
)

homeassistant/components/growatt_server/strings.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@
362362
"tlx_wattage_input_4": {
363363
"name": "Input 4 wattage"
364364
},
365+
"tlx_solar_generation_today": {
366+
"name": "Solar energy today"
367+
},
365368
"tlx_solar_generation_total": {
366369
"name": "Lifetime total solar energy"
367370
},
@@ -443,6 +446,45 @@
443446
"tlx_statement_of_charge": {
444447
"name": "State of charge (SoC)"
445448
},
449+
"tlx_pac_to_local_load": {
450+
"name": "Local load power"
451+
},
452+
"tlx_pac_to_user_total": {
453+
"name": "Import power"
454+
},
455+
"tlx_pac_to_grid_total": {
456+
"name": "Export power"
457+
},
458+
"tlx_system_production_today": {
459+
"name": "System production today"
460+
},
461+
"tlx_system_production_total": {
462+
"name": "Lifetime system production"
463+
},
464+
"tlx_self_consumption_today": {
465+
"name": "Self consumption today"
466+
},
467+
"tlx_self_consumption_total": {
468+
"name": "Lifetime self consumption"
469+
},
470+
"tlx_import_from_grid_today": {
471+
"name": "Import from grid today"
472+
},
473+
"tlx_import_from_grid_total": {
474+
"name": "Lifetime import from grid"
475+
},
476+
"tlx_batteries_charged_from_grid_today": {
477+
"name": "Batteries charged from grid today"
478+
},
479+
"tlx_batteries_charged_from_grid_total": {
480+
"name": "Lifetime batteries charged from grid"
481+
},
482+
"tlx_p_system": {
483+
"name": "System power"
484+
},
485+
"tlx_p_self": {
486+
"name": "Self power"
487+
},
446488
"total_money_today": {
447489
"name": "Total money today"
448490
},

0 commit comments

Comments
 (0)