Dashboard: drop gauges, fix tile legibility, 2-column layout

Addresses review feedback on the first panel pass:
- remove the output and pump-1 gauge cards (numeric tiles instead)
- fix illegible status lamps: a full-width 4-up glance strip with short
  labels replaces the cramped icon-only tile row; readouts use
  grid_options so names no longer truncate
- widen to a 2-column sections layout
- history graphs stay on their own Diagnostics & Trends tab

Verified in-browser against the live HA (2026.1.2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
James Bateman (hp-laptop)
2026-10-02 13:56:03 +01:00
co-authored by Claude Opus 4.8
parent a8bf154c99
commit f3fb8534bc
+87 -91
View File
@@ -5,71 +5,65 @@
# template sensors defined in configuration.butterfly.yaml (dBm -> mW). # template sensors defined in configuration.butterfly.yaml (dBm -> mW).
# Styling uses card-mod (installed via HACS). # Styling uses card-mod (installed via HACS).
# #
# Two views: # Two tabs:
# Control — the panel: status lamps, output, the two stages, # Control — the panel: status strip, output readout, the two
# emergency stop. Everything you touch when running. # stages, emergency stop. Everything you touch.
# Diagnostics & Trends — history graphs plus network / TEC / error detail, # Diagnostics & Trends — the history graphs plus network / TEC / error
# kept off the control view so it stays uncluttered. # detail, kept off the control tab so it stays clean.
title: Butterfly Rack title: Butterfly Rack
views: views:
# =================================================================== # ===================================================================
# VIEW 1 — CONTROL PANEL # TAB 1 — CONTROL PANEL
# =================================================================== # ===================================================================
- title: Control - title: Control
path: control path: control
icon: mdi:laser-pointer icon: mdi:laser-pointer
type: sections type: sections
max_columns: 3 max_columns: 2
sections: sections:
# ---- Rack status ------------------------------------------------- # ---- Rack status (full width) -----------------------------------
- type: grid - type: grid
column_span: 3 column_span: 2
cards: cards:
- type: heading - type: heading
heading: Butterfly EDFA Rack heading: Butterfly EDFA Rack
heading_style: title heading_style: title
icon: mdi:laser-pointer icon: mdi:laser-pointer
- type: heading - type: heading
heading: 1550 nm MOPA · Class 4 · invisible — treat output as hazardous heading: 1550 nm MOPA · Class 4 · invisible 1550 nm — treat output as hazardous
heading_style: subtitle heading_style: subtitle
- type: grid - type: glance
columns: 5 state_color: true
square: false columns: 4
cards: grid_options:
- type: tile columns: 12
entity: binary_sensor.butterfly_edfa_rack_seed_link entities:
- entity: binary_sensor.butterfly_edfa_rack_seed_link
name: Seed link name: Seed link
icon: mdi:lan-connect - entity: binary_sensor.butterfly_edfa_rack_amp_link
- type: tile
entity: binary_sensor.butterfly_edfa_rack_amp_link
name: Amp link name: Amp link
icon: mdi:lan-connect - entity: switch.butterfly_edfa_rack_seed_laser
- type: tile
entity: switch.butterfly_edfa_rack_seed_laser
name: Seed name: Seed
icon: mdi:laser-pointer - entity: switch.butterfly_edfa_rack_amp_pump
color: amber
- type: tile
entity: switch.butterfly_edfa_rack_amp_pump
name: Booster name: Booster
icon: mdi:flash - type: tile
color: red entity: sensor.butterfly_edfa_rack_amp_warnings
- type: tile name: Status
entity: sensor.butterfly_edfa_rack_amp_warnings icon: mdi:alert-decagram
name: Status grid_options:
icon: mdi:alert-decagram columns: 12
card_mod: card_mod:
style: | style: |
ha-card { ha-card {
{% set w = states('sensor.butterfly_edfa_rack_amp_warnings') %} {% set w = states('sensor.butterfly_edfa_rack_amp_warnings') %}
{% if w in ['none','Pump is OFF','unknown','unavailable'] or w == '' %} {% if w in ['none','Pump is OFF','unknown','unavailable'] or w == '' %}
--tile-color: var(--green-color, #43a047); --tile-color: var(--green-color, #43a047);
{% else %} {% else %}
--tile-color: var(--red-color, #e53935); --tile-color: var(--red-color, #e53935);
{% endif %} {% endif %}
} }
# ---- Output (the headline) -------------------------------------- # ---- Output readout ---------------------------------------------
- type: grid - type: grid
column_span: 1 column_span: 1
cards: cards:
@@ -77,28 +71,27 @@ views:
heading: Output heading: Output
heading_style: subtitle heading_style: subtitle
icon: mdi:arrow-left-bold icon: mdi:arrow-left-bold
- type: gauge - type: tile
entity: sensor.butterfly_edfa_rack_output_power_mw entity: sensor.butterfly_edfa_rack_output_power_mw
name: Output power name: Output power
unit: mW icon: mdi:arrow-left-bold
needle: true grid_options:
min: 0 columns: 12
max: 1100 card_mod:
severity: style: |
green: 0 ha-card { --tile-color: var(--cyan-color, #00acc1); }
yellow: 850 - type: tile
red: 1000 entity: sensor.butterfly_edfa_rack_output_power
- type: horizontal-stack name: Output dBm
cards: icon: mdi:sine-wave
- type: tile grid_options:
entity: sensor.butterfly_edfa_rack_output_power columns: 6
name: Output - type: tile
icon: mdi:arrow-left-bold entity: sensor.butterfly_edfa_rack_amp_input_power_mw
hide_state: false name: EDFA in
- type: tile icon: mdi:arrow-right-bold
entity: sensor.butterfly_edfa_rack_amp_input_power_mw grid_options:
name: EDFA in columns: 6
icon: mdi:arrow-right-bold
# ---- Stage 1: seed ---------------------------------------------- # ---- Stage 1: seed ----------------------------------------------
- type: grid - type: grid
@@ -112,23 +105,29 @@ views:
state_color: true state_color: true
entities: entities:
- entity: switch.butterfly_edfa_rack_seed_laser - entity: switch.butterfly_edfa_rack_seed_laser
name: Seed laser (turn on FIRST) name: Seed laser (ON first)
- entity: number.butterfly_edfa_rack_seed_set_current - entity: number.butterfly_edfa_rack_seed_set_current
name: Set current (≤ 300 mA) name: Set current (mA)
- entity: number.butterfly_edfa_rack_seed_thermistor_setpoint - entity: number.butterfly_edfa_rack_seed_thermistor_setpoint
name: Temp setpoint (Ω, rtset) name: Temp setpoint (Ω)
- type: horizontal-stack - type: tile
cards: entity: sensor.butterfly_edfa_rack_seed_current
- type: tile name: Current
entity: sensor.butterfly_edfa_rack_seed_current icon: mdi:current-dc
name: Current grid_options:
icon: mdi:current-dc columns: 6
- type: tile - type: tile
entity: sensor.butterfly_edfa_rack_seed_temperature entity: sensor.butterfly_edfa_rack_seed_temperature
name: Seed temp name: Seed temp
- type: tile icon: mdi:thermometer
entity: sensor.butterfly_edfa_rack_seed_photodiode_current grid_options:
name: Monitor PD columns: 6
- type: tile
entity: sensor.butterfly_edfa_rack_seed_photodiode_current
name: Monitor PD
icon: mdi:current-dc
grid_options:
columns: 6
# ---- Stage 2: booster ------------------------------------------- # ---- Stage 2: booster -------------------------------------------
- type: grid - type: grid
@@ -144,26 +143,23 @@ views:
- entity: switch.butterfly_edfa_rack_amp_pump - entity: switch.butterfly_edfa_rack_amp_pump
name: Pump enable name: Pump enable
- entity: number.butterfly_edfa_rack_amp_pump_current - entity: number.butterfly_edfa_rack_amp_pump_current
name: Pump-1 set (≤ 4000 mA ≈ 1 W) name: Pump-1 set (mA)
- type: gauge - type: tile
entity: sensor.butterfly_edfa_rack_amp_pump_1_current entity: sensor.butterfly_edfa_rack_amp_pump_1_current
name: Pump-1 current name: Pump-1 current
unit: mA icon: mdi:current-dc
needle: true grid_options:
min: 0 columns: 6
max: 4000
severity:
green: 0
yellow: 2800
red: 3700
- type: tile - type: tile
entity: sensor.butterfly_edfa_rack_amp_module_temperature entity: sensor.butterfly_edfa_rack_amp_module_temperature
name: Module temp name: Module temp
icon: mdi:thermometer icon: mdi:thermometer
grid_options:
columns: 6
# ---- Emergency --------------------------------------------------- # ---- Emergency (full width) -------------------------------------
- type: grid - type: grid
column_span: 3 column_span: 2
cards: cards:
- type: heading - type: heading
heading: Emergency heading: Emergency
@@ -224,7 +220,7 @@ views:
} }
# =================================================================== # ===================================================================
# VIEW 2 — DIAGNOSTICS & TRENDS # TAB 2 — DIAGNOSTICS & TRENDS
# =================================================================== # ===================================================================
- title: Diagnostics & Trends - title: Diagnostics & Trends
path: diagnostics path: diagnostics