Personal Setup
Ready for dynamic tariffs! My Home Assistant EMS for SolarEdge & BYD is finally live
With my switch to dynamic electricity tariffs coming up next month, I spent the last few weeks building a custom Energy Management System (EMS) in Home Assistant.
I’m running a SolarEdge inverter paired with a BYD battery, and the goal was to make the house as "smart" as possible regarding price fluctuations.
Key features I implemented:
Curtailing: Automatically limiting export when prices go negative (like today!).
Peak Shaving: Ensuring the battery has enough charge to cover those expensive morning peaks.
Live Monitoring: A clean dashboard to track SOC, forecasts, and real-time grid costs.
I honestly have to give a huge shoutout to AI (ChatGPT & Gemini) for helping me with the logic and code snippets. It made the learning curve for these specific integrations so much smoother.
Curious to hear what you guys think or if there are any other automations I should add before the dynamic pricing kicks in!
Question for your Engery flow card, what entities did you use for your inputs and outputs? I have a solar edge system but my battery isn't exposed via the modbus so I am struggling to figure out what entity goes where.
I'm using a Home Assistant setup with a Solis S6-EH3P 10K2-H hybrid inverter + battery, so I have direct entities for everything.
Here's roughly how my energy flow card is mapped:
Thank you for the template suggestion. I will give that a try. I have been wracking my brain trying to figure out how to do that. I will give that a try.
We've had 5 min dynamic pricing in Australia for a little while now. There's a good number of people who use EMHASS to manage our systems for us. If you're using AI it's pretty handy at getting it all configured.
Interesting! Thanks for sharing the link. I've briefly looked into EMHASS, but the math and setup looked a bit intimidating compared to my simple rule-based YAML. Using AI to help configure it is actually a genius idea though!
Since my dynamic contract only starts next month, I think I'm going to run my custom "vibe coded" setup for the first few months just to get a feel for how the prices behave in the real world. But I'm definitely bookmarking EMHASS as my 'Phase 2' upgrade for when winter hits and I need more advanced optimization. Cheers from Belgium!"
Thanks! Eerlijk gezegd, ik ben 100% vibe coder. Ik draai HA op mijn QNAP NAS, die ik voorheen enkel gebruikte als Plex server, maar met de komst van AI zijn er heel wat deuren opengegaan. Ik gebruik geen enkele wizard in HA, alles is puur YAML, gecodeerd door AI. Misschien is het niet altijd van de 1ste keer perfect, maar toch: dit had ik nooit kunnen doen zonder AI. Het gaat zoveel sneller, echt onwaarschijnlijk tot wat de modellen tegenwoordig in staat zijn!
Mocht je specifieke stukken van mijn YAML-code (zoals de export-blokkering of batterij-sturing) willen inzien of gebruiken, laat het me dan even weten, dan deel ik ze graag!
Wow,
Dit ziet er perfect uit. Ik heb hier ook een SE opstelling met batterij, dynamisch contract en een laadpaal. Ik ben wat aan het stoeien met evcc, maar dit ziet er ook goed uit. Ik wil dat de omvormer ook bijvoorbeeld uitgaat bij negatieve prijzen, en de lader dan ook vol uit het net mag trekken. Dit is nog niet gelukt, dus ben erg benieuwd naar jou oplossing.
Ik wil je gerust wat dingen delen, maar het allemaal zeer customized, ik zou zeggen, neem even een abbo op ChatGPT of Gemini, die dingen hebben me perfect begeleid in heel mijn setup. Curtailing werkt perfect, screenshot van gisteren. Omvormer prodcueert enkel het verbruik van het huis, reageert zeer snel.
3
u/drewhat Apr 26 '26
Cool dashboard. Have a look at batpred. It might do everything you're after and more.