diff --git a/config/home-assistant/configuration/mqtt/sensors.yaml b/config/home-assistant/configuration/mqtt/sensors.yaml index 75cbfe32..d6803d8f 100644 --- a/config/home-assistant/configuration/mqtt/sensors.yaml +++ b/config/home-assistant/configuration/mqtt/sensors.yaml @@ -65,3 +65,11 @@ state_topic: "/modbus/secondary/microwave/reading" value_template: "{{ value_json.tot | float(default=0) }}" <<: *common_used_energy + +- name: inverter_sun2000_accumulated_yield + state_topic: "/modbus/inverter/sun2000/reading" + value_template: "{{ value_json.total_p | float(default=0) }}" + <<: &common_used_energy + device_class: energy + state_class: total + unit_of_measurement: kWh diff --git a/config/home-assistant/energy.json b/config/home-assistant/energy.json index 344fb009..ef26372d 100644 --- a/config/home-assistant/energy.json +++ b/config/home-assistant/energy.json @@ -25,6 +25,18 @@ } ], "cost_adjustment_day": 0.0 + }, + { + "type": "solar", + "flow_from": [ + { + "stat_energy_from": "sensor.inverter_sun2000_accumulated_yield", + "stat_cost": null, + "entity_energy_from": "sensor.inverter_sun2000_accumulated_yield", + "entity_energy_price": null, + "number_energy_price": null + } + ] } ], "device_consumption": [