garaga page 11
This commit is contained in:
@@ -364,6 +364,9 @@
|
||||
// Control card
|
||||
renderOutletControls(container, device);
|
||||
|
||||
// State card
|
||||
renderStateDisplay(container, device);
|
||||
|
||||
// Find and render powermeter
|
||||
const powermeterDevice = Object.values(devicesData).find(d => d.device_id === 'powermeter_caroutlet');
|
||||
if (powermeterDevice) {
|
||||
@@ -399,8 +402,13 @@
|
||||
|
||||
card.appendChild(controlGroup);
|
||||
container.appendChild(card);
|
||||
}
|
||||
|
||||
function renderStateDisplay(container, device) {
|
||||
// State display as separate card
|
||||
const state = deviceStates[device.device_id];
|
||||
const currentPower = state?.power === 'on';
|
||||
|
||||
const stateCard = document.createElement('div');
|
||||
stateCard.className = 'card';
|
||||
stateCard.style.textAlign = 'center';
|
||||
|
||||
Reference in New Issue
Block a user