Add energy-flow jsx template

This commit is contained in:
2026-08-20 22:48:18 +00:00
parent f5b77543d7
commit 5e5aaac669
@@ -0,0 +1,19 @@
---
label: energy-flow voorbeeld
description: Energie-flow visualisatie
type: energy-flow
author: maik
---
import React from 'react';
export default function EnergyFlowTemplate({ data }) {
const { grid = 0, pv = 0, battery = 0 } = data ?? {};
return (
<div className="widget-flow">
<span className={grid > 0 ? 'import' : 'export'}>{Math.abs(grid).toFixed(0)}W</span>
<span>{pv.toFixed(0)}W </span>
<span>{battery.toFixed(0)}W 🔋</span>
</div>
);
}