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:
maziggy
2026-05-12 07:37:13 +02:00
parent 359e4a778e
commit bf2b34ebcf
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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>
)}