@@ -1959,20 +1959,105 @@ def getHardwareVersion(self, new_data: dict[str, Any]) -> str | None:
19591959ENERGY_DASHBOARD_MAPPING = EnergyDashboardMapping (
19601960 plugin_name = "solinteg" ,
19611961 mappings = [
1962+ # ===== SOC SENSOR =====
1963+ # Battery SoC %
1964+ EnergyDashboardSensorMapping (
1965+ source_key = "battery_soc" ,
1966+ target_key = "battery_soc" ,
1967+ name = "Battery SoC" ,
1968+ ),
1969+ # ===== POWER SENSORS =====
1970+ # Grid Power
19621971 EnergyDashboardSensorMapping (
19631972 source_key = "measured_power" ,
1964- source_key_pm = None , # measured_power is system-wide
19651973 target_key = "grid_power" ,
19661974 name = "Grid Power" ,
19671975 invert = True ,
19681976 icon = "mdi:transmission-tower" ,
19691977 ),
1978+ # Solar Power
1979+ EnergyDashboardSensorMapping (
1980+ source_key = "pv_power_total" ,
1981+ target_key = "solar_power" ,
1982+ name = "Solar Power" ,
1983+ ),
1984+ # PV Variant Power
1985+ EnergyDashboardSensorMapping (
1986+ source_key = "pv_power_{n}" ,
1987+ target_key = "pv_power_{n}" ,
1988+ name = "PV Power {n}" ,
1989+ ),
1990+ # Battery Power
19701991 EnergyDashboardSensorMapping (
1971- source_key = "battery_power" , # Note: plugin_solinteg uses battery_power (not battery_power_charge)
1972- source_key_pm = None , # No parallel mode support in this plugin
1992+ source_key = "battery_power" ,
19731993 target_key = "battery_power" ,
19741994 name = "Battery Power" ,
1975- invert = True ,
1995+ ),
1996+ # Home Consumption Power
1997+ EnergyDashboardSensorMapping (
1998+ source_key = "house_total_load" ,
1999+ target_key = "home_consumption_power" ,
2000+ name = "Home Consumption Power" ,
2001+ ),
2002+ # Grid to Battery Power (TODO)
2003+ # EnergyDashboardSensorMapping(
2004+ # source_key="inverter_power",
2005+ # target_key="grid_to_battery_power",
2006+ # name="Grid to Battery Power",
2007+ # filter_function=lambda v: max(0 - v, 0),
2008+ # icon="mdi:transmission-tower-export",
2009+ # ),
2010+ # ===== ENERGY SENSORS =====
2011+ # PV Variant Energy (per string).
2012+ EnergyDashboardSensorMapping (
2013+ source_key = "pv_power_{n}" ,
2014+ target_key = "pv_energy_{n}" ,
2015+ name = "PV Energy {n}" ,
2016+ use_riemann_sum = True ,
2017+ filter_function = lambda v : max (0 , v ),
2018+ ),
2019+ # Grid Import Energy
2020+ EnergyDashboardSensorMapping (
2021+ source_key = "grid_import_today" ,
2022+ target_key = "grid_energy_import" ,
2023+ name = "Grid Import Energy" ,
2024+ ),
2025+ # Grid Export Energy
2026+ EnergyDashboardSensorMapping (
2027+ source_key = "grid_export_today" ,
2028+ target_key = "grid_energy_export" ,
2029+ name = "Grid Export Energy" ,
2030+ ),
2031+ # Home Consumption Energy
2032+ EnergyDashboardSensorMapping (
2033+ source_key = "house_energy_today" ,
2034+ target_key = "home_consumption_energy" ,
2035+ name = "Home Consumption Energy" ,
2036+ ),
2037+ # Battery Charge Energy
2038+ EnergyDashboardSensorMapping (
2039+ source_key = "battery_charge_today" ,
2040+ target_key = "battery_energy_charge" ,
2041+ name = "Battery Charge Energy" ,
2042+ ),
2043+ # Battery Discharge Energy
2044+ EnergyDashboardSensorMapping (
2045+ source_key = "battery_discharge_today" ,
2046+ target_key = "battery_energy_discharge" ,
2047+ name = "Battery Discharge Energy" ,
2048+ ),
2049+ # Grid to Battery Energy (TODO)
2050+ # EnergyDashboardSensorMapping(
2051+ # source_key="e_charge_today",
2052+ # target_key="grid_to_battery_energy",
2053+ # name="Grid to Battery Energy",
2054+ # icon="mdi:transmission-tower-export",
2055+ # ),
2056+ # Solar Production Energy
2057+ EnergyDashboardSensorMapping (
2058+ source_key = "energy_generation_today" ,
2059+ target_key = "solar_energy_production" ,
2060+ name = "Solar Production Energy" ,
19762061 ),
19772062 ],
19782063 parallel_mode_supported = False , # Plugin doesn't support parallel mode
0 commit comments