From 5e5aaac669a331e4577e2a6abba2a9bbc80bf34f Mon Sep 17 00:00:00 2001 From: maik Date: Thu, 20 Aug 2026 22:48:18 +0000 Subject: [PATCH] Add energy-flow jsx template --- .../jsx/energy-flow/energy-flow-example.jsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 templates/jsx/energy-flow/energy-flow-example.jsx diff --git a/templates/jsx/energy-flow/energy-flow-example.jsx b/templates/jsx/energy-flow/energy-flow-example.jsx new file mode 100644 index 0000000..a313cf8 --- /dev/null +++ b/templates/jsx/energy-flow/energy-flow-example.jsx @@ -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 ( +
+ 0 ? 'import' : 'export'}>{Math.abs(grid).toFixed(0)}W + {pv.toFixed(0)}W ☀ + {battery.toFixed(0)}W 🔋 +
+ ); +}