From 1c325bf2a275a273b89a6762ab4ab4a15ebbb8db Mon Sep 17 00:00:00 2001 From: "James Bateman (hp-laptop)" Date: Fri, 2 Oct 2026 16:14:14 +0100 Subject: [PATCH] Dashboard: big output-power readout beside a square SHUTDOWN Top row is now a 2-unit markdown card showing output power large in mW (sized/centred via card-mod piercing the ha-markdown shadow, since the markdown card strips inline styles) next to the 1-unit square SHUTDOWN button. Dropped the now-redundant mW tile from the lower Output section, leaving Output dBm and EDFA in. Co-Authored-By: Claude Opus 4.8 (1M context) --- ui-lovelace-butterfly.yaml | 49 +++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/ui-lovelace-butterfly.yaml b/ui-lovelace-butterfly.yaml index 6d8d324..dc28292 100644 --- a/ui-lovelace-butterfly.yaml +++ b/ui-lovelace-butterfly.yaml @@ -23,23 +23,46 @@ views: # Status -> Output -> Seed -> Booster -> Emergency. max_columns: 1 sections: - # ---- Emergency shutdown (top) ----------------------------------- + # ---- Output readout (2 units) + SHUTDOWN (1 unit, square) ------- - type: grid cards: - - type: heading - heading: Emergency - heading_style: subtitle - icon: mdi:alarm-light + # Big output-power readout. + # HA's markdown card strips inline styles, so size/centre via + # card-mod piercing the ha-markdown shadow (the three spans are the + # value, the " mW" unit, and the "Output power" label). + - type: markdown + grid_options: + columns: 8 + rows: 3 + content: > +
{{ states('sensor.butterfly_edfa_rack_output_power_mw') + }} mW
Output power
+ card_mod: + style: + .: | + ha-card { + height: 100%; + display: flex; + align-items: center; + justify-content: center; + padding: 12px; + } + ha-markdown$: | + div { text-align: center !important; width: 100%; line-height: 1.05; } + div span:nth-of-type(1) { font-size: 3.6rem; font-weight: 700; } + div span:nth-of-type(2) { font-size: 1.7rem; font-weight: 600; } + div span:nth-of-type(3) { color: var(--secondary-text-color); } # One-tap emergency stop. Runs butterfly_edfa_shutdown: pump-1 to 0, # booster off, then seed off (EDFA first, then seed). No confirmation # so it acts immediately; the action is safe (it only turns things off). - type: button name: SHUTDOWN icon: mdi:alarm-light - icon_height: 48px + icon_height: 40px show_state: false grid_options: - columns: 12 + columns: 4 + rows: 3 tap_action: action: call-service service: script.butterfly_edfa_shutdown @@ -51,7 +74,8 @@ views: --primary-text-color: #fff; --paper-item-icon-color: #fff; font-weight: 800; - letter-spacing: 0.08em; + letter-spacing: 0.06em; + height: 100%; } # ---- Rack status (full width) ----------------------------------- @@ -115,15 +139,6 @@ views: heading: Output heading_style: subtitle icon: mdi:arrow-left-bold - - type: tile - entity: sensor.butterfly_edfa_rack_output_power_mw - name: Output power - icon: mdi:arrow-left-bold - grid_options: - columns: 12 - card_mod: - style: | - ha-card { --tile-color: var(--cyan-color, #00acc1); } - type: tile entity: sensor.butterfly_edfa_rack_output_power name: Output dBm