kellerza / sunsynk

Deye/Sunsynk Inverter Python library and Home Assistant OS Addon
https://kellerza.github.io/sunsynk/
MIT License
198 stars 85 forks source link

grid_ct_power_export sensor #127

Closed amctear closed 1 year ago

amctear commented 1 year ago

My Sunsynk addon x 2 have been working wonderfully since installed and set, thanks to Johann. An interesting Blueprint PV solar excess optimizer - auto control, has recently been released which requres some template skills to generate a new sensor Export power to the grid in watts.
Sadly, I don't have the skills to strip out the grid power out portion from the grid power sensor. Hoping someone can help please image

Blueprint https://community.home-assistant.io/t/pv-solar-excess-optimizer-auto-control-appliances-wallbox-dish-washer-heatpump-based-on-excess-solar-power/552677

kellerza commented 1 year ago
SENSORS:
 - grid_ct_power

The template could be something like this?

{{ -int(states("sensor.ss_grid_ct_power")) if int(states("sensor.ss_grid_ct_power"))<0 else 0 }}

Let us know how it goes, I'll also have a look at the referenced project!

amctear commented 1 year ago

Thanks, Will give it a try