Files
ems2-templates/templates/jsx/energy-flow/energy-flow-example.jsx
T
2026-08-20 22:48:18 +00:00

20 lines
487 B
React

---
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>
);
}