mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-21 10:15:04 +02:00
fix(ui): round smart-plug live wattage on printer card (#1266)
Plugs reporting fractional watts (Kauf PLF12 / ESPHome via MQTT) overflowed the card width. SmartPlugCard and SwitchbarPopover already round the same field; only the printer-card badge was raw.
This commit is contained in:
@@ -4566,7 +4566,7 @@ function PrinterCard({
|
||||
>
|
||||
{plugStatus.state || '?'}
|
||||
{plugStatus.state === 'ON' && plugStatus.energy?.power != null && (
|
||||
<span className="text-yellow-400 ml-1.5">· {plugStatus.energy.power}W</span>
|
||||
<span className="text-yellow-400 ml-1.5">· {Math.round(plugStatus.energy.power)}W</span>
|
||||
)}
|
||||
</span>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user