From a227771151f9eb1c15d50fac1ea78966f7267313 Mon Sep 17 00:00:00 2001 From: "James Bateman (hp-laptop)" Date: Fri, 2 Oct 2026 16:04:42 +0100 Subject: [PATCH] Dashboard: single SHUTDOWN button at the top of the Control view Replace the three-button emergency row (PUMP OFF / SEED OFF / SHUTDOWN) with one full-width red SHUTDOWN button, moved to the top of the view. It runs script.butterfly_edfa_shutdown (pump-1 to 0, booster off, then seed off) with no confirmation, so it acts immediately. Co-Authored-By: Claude Opus 4.8 (1M context) --- ui-lovelace-butterfly.yaml | 93 +++++++++++++------------------------- 1 file changed, 31 insertions(+), 62 deletions(-) diff --git a/ui-lovelace-butterfly.yaml b/ui-lovelace-butterfly.yaml index 3aca2c9..6d8d324 100644 --- a/ui-lovelace-butterfly.yaml +++ b/ui-lovelace-butterfly.yaml @@ -23,6 +23,37 @@ views: # Status -> Output -> Seed -> Booster -> Emergency. max_columns: 1 sections: + # ---- Emergency shutdown (top) ----------------------------------- + - type: grid + cards: + - type: heading + heading: Emergency + heading_style: subtitle + icon: mdi:alarm-light + # 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 + show_state: false + grid_options: + columns: 12 + tap_action: + action: call-service + service: script.butterfly_edfa_shutdown + card_mod: + style: | + ha-card { + background: #c0392b; + color: #fff; + --primary-text-color: #fff; + --paper-item-icon-color: #fff; + font-weight: 800; + letter-spacing: 0.08em; + } + # ---- Rack status (full width) ----------------------------------- - type: grid column_span: 2 @@ -173,68 +204,6 @@ views: grid_options: columns: 6 - # ---- Emergency (full width) ------------------------------------- - - type: grid - column_span: 2 - cards: - - type: heading - heading: Emergency - heading_style: subtitle - icon: mdi:alarm-light - - type: horizontal-stack - cards: - - type: button - name: PUMP OFF - icon: mdi:power-off - icon_height: 44px - show_state: false - tap_action: - action: call-service - service: switch.turn_off - target: - entity_id: switch.butterfly_edfa_rack_amp_pump - card_mod: &estop_amber - style: | - ha-card { - background: #e67e22; - color: #fff; - --primary-text-color: #fff; - --paper-item-icon-color: #fff; - font-weight: 700; - letter-spacing: 0.04em; - } - - type: button - name: SEED OFF - icon: mdi:power-off - icon_height: 44px - show_state: false - tap_action: - action: call-service - service: switch.turn_off - target: - entity_id: switch.butterfly_edfa_rack_seed_laser - card_mod: *estop_amber - - type: button - name: SHUTDOWN - icon: mdi:alarm-light - icon_height: 44px - show_state: false - tap_action: - action: call-service - service: script.butterfly_edfa_shutdown - confirmation: - text: Ramp pump to 0, disable booster, then seed? - card_mod: - style: | - ha-card { - background: #c0392b; - color: #fff; - --primary-text-color: #fff; - --paper-item-icon-color: #fff; - font-weight: 800; - letter-spacing: 0.06em; - } - # =================================================================== # TAB 2 — DIAGNOSTICS & TRENDS # ===================================================================