Redesign dashboard as a laser control panel
Split into two sections-view tabs. The Control tab leads with a status- lamp row (seed/amp link, seed, booster, fault status), a headline output gauge in mW with dBm/input tiles, then the Seed and Booster stages as labelled channels with their controls, and a red emergency block (PUMP OFF / SEED OFF / SHUTDOWN) styled via card-mod. The Diagnostics & Trends tab absorbs the history graphs and the network/TEC/error detail that previously crowded the top of the single view. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
abcb6b7553
commit
a8bf154c99
+282
-93
@@ -1,42 +1,264 @@
|
|||||||
# Butterfly EDFA Rack (MOPA) — YAML-mode dashboard.
|
# Butterfly EDFA Rack (MOPA) — laser control panel.
|
||||||
# Registered in configuration.yaml (lovelace: dashboards: butterfly-rack).
|
# Registered in configuration.yaml (lovelace: dashboards: butterfly-rack).
|
||||||
# Entities auto-discovered over MQTT; the *_mw power sensors are MQTT template
|
#
|
||||||
# sensors defined in configuration.yaml (dBm -> mW).
|
# Entities are auto-discovered over MQTT; the *_mw power sensors are MQTT
|
||||||
|
# template sensors defined in configuration.butterfly.yaml (dBm -> mW).
|
||||||
|
# Styling uses card-mod (installed via HACS).
|
||||||
|
#
|
||||||
|
# Two views:
|
||||||
|
# Control — the panel: status lamps, output, the two stages,
|
||||||
|
# emergency stop. Everything you touch when running.
|
||||||
|
# Diagnostics & Trends — history graphs plus network / TEC / error detail,
|
||||||
|
# kept off the control view so it stays uncluttered.
|
||||||
title: Butterfly Rack
|
title: Butterfly Rack
|
||||||
views:
|
views:
|
||||||
- title: MOPA
|
# ===================================================================
|
||||||
path: mopa
|
# VIEW 1 — CONTROL PANEL
|
||||||
|
# ===================================================================
|
||||||
|
- title: Control
|
||||||
|
path: control
|
||||||
icon: mdi:laser-pointer
|
icon: mdi:laser-pointer
|
||||||
|
type: sections
|
||||||
|
max_columns: 3
|
||||||
|
sections:
|
||||||
|
# ---- Rack status -------------------------------------------------
|
||||||
|
- type: grid
|
||||||
|
column_span: 3
|
||||||
cards:
|
cards:
|
||||||
- type: vertical-stack
|
- type: heading
|
||||||
title: Butterfly EDFA Rack (MOPA, 1550 nm, Class 4)
|
heading: Butterfly EDFA Rack
|
||||||
|
heading_style: title
|
||||||
|
icon: mdi:laser-pointer
|
||||||
|
- type: heading
|
||||||
|
heading: 1550 nm MOPA · Class 4 · invisible — treat output as hazardous
|
||||||
|
heading_style: subtitle
|
||||||
|
- type: grid
|
||||||
|
columns: 5
|
||||||
|
square: false
|
||||||
cards:
|
cards:
|
||||||
# ===== Graphs at the top: powers (mW) and temperatures =====
|
- type: tile
|
||||||
|
entity: binary_sensor.butterfly_edfa_rack_seed_link
|
||||||
|
name: Seed link
|
||||||
|
icon: mdi:lan-connect
|
||||||
|
- type: tile
|
||||||
|
entity: binary_sensor.butterfly_edfa_rack_amp_link
|
||||||
|
name: Amp link
|
||||||
|
icon: mdi:lan-connect
|
||||||
|
- type: tile
|
||||||
|
entity: switch.butterfly_edfa_rack_seed_laser
|
||||||
|
name: Seed
|
||||||
|
icon: mdi:laser-pointer
|
||||||
|
color: amber
|
||||||
|
- type: tile
|
||||||
|
entity: switch.butterfly_edfa_rack_amp_pump
|
||||||
|
name: Booster
|
||||||
|
icon: mdi:flash
|
||||||
|
color: red
|
||||||
|
- type: tile
|
||||||
|
entity: sensor.butterfly_edfa_rack_amp_warnings
|
||||||
|
name: Status
|
||||||
|
icon: mdi:alert-decagram
|
||||||
|
card_mod:
|
||||||
|
style: |
|
||||||
|
ha-card {
|
||||||
|
{% set w = states('sensor.butterfly_edfa_rack_amp_warnings') %}
|
||||||
|
{% if w in ['none','Pump is OFF','unknown','unavailable'] or w == '' %}
|
||||||
|
--tile-color: var(--green-color, #43a047);
|
||||||
|
{% else %}
|
||||||
|
--tile-color: var(--red-color, #e53935);
|
||||||
|
{% endif %}
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---- Output (the headline) --------------------------------------
|
||||||
|
- type: grid
|
||||||
|
column_span: 1
|
||||||
|
cards:
|
||||||
|
- type: heading
|
||||||
|
heading: Output
|
||||||
|
heading_style: subtitle
|
||||||
|
icon: mdi:arrow-left-bold
|
||||||
|
- type: gauge
|
||||||
|
entity: sensor.butterfly_edfa_rack_output_power_mw
|
||||||
|
name: Output power
|
||||||
|
unit: mW
|
||||||
|
needle: true
|
||||||
|
min: 0
|
||||||
|
max: 1100
|
||||||
|
severity:
|
||||||
|
green: 0
|
||||||
|
yellow: 850
|
||||||
|
red: 1000
|
||||||
|
- type: horizontal-stack
|
||||||
|
cards:
|
||||||
|
- type: tile
|
||||||
|
entity: sensor.butterfly_edfa_rack_output_power
|
||||||
|
name: Output
|
||||||
|
icon: mdi:arrow-left-bold
|
||||||
|
hide_state: false
|
||||||
|
- type: tile
|
||||||
|
entity: sensor.butterfly_edfa_rack_amp_input_power_mw
|
||||||
|
name: EDFA in
|
||||||
|
icon: mdi:arrow-right-bold
|
||||||
|
|
||||||
|
# ---- Stage 1: seed ----------------------------------------------
|
||||||
|
- type: grid
|
||||||
|
column_span: 1
|
||||||
|
cards:
|
||||||
|
- type: heading
|
||||||
|
heading: Seed · Stage 1 (CTL200)
|
||||||
|
heading_style: subtitle
|
||||||
|
icon: mdi:alpha-s-circle-outline
|
||||||
|
- type: entities
|
||||||
|
state_color: true
|
||||||
|
entities:
|
||||||
|
- entity: switch.butterfly_edfa_rack_seed_laser
|
||||||
|
name: Seed laser (turn on FIRST)
|
||||||
|
- entity: number.butterfly_edfa_rack_seed_set_current
|
||||||
|
name: Set current (≤ 300 mA)
|
||||||
|
- entity: number.butterfly_edfa_rack_seed_thermistor_setpoint
|
||||||
|
name: Temp setpoint (Ω, rtset)
|
||||||
|
- type: horizontal-stack
|
||||||
|
cards:
|
||||||
|
- type: tile
|
||||||
|
entity: sensor.butterfly_edfa_rack_seed_current
|
||||||
|
name: Current
|
||||||
|
icon: mdi:current-dc
|
||||||
|
- type: tile
|
||||||
|
entity: sensor.butterfly_edfa_rack_seed_temperature
|
||||||
|
name: Seed temp
|
||||||
|
- type: tile
|
||||||
|
entity: sensor.butterfly_edfa_rack_seed_photodiode_current
|
||||||
|
name: Monitor PD
|
||||||
|
|
||||||
|
# ---- Stage 2: booster -------------------------------------------
|
||||||
|
- type: grid
|
||||||
|
column_span: 1
|
||||||
|
cards:
|
||||||
|
- type: heading
|
||||||
|
heading: Booster · Stage 2 (M511, ACC)
|
||||||
|
heading_style: subtitle
|
||||||
|
icon: mdi:alpha-b-circle-outline
|
||||||
|
- type: entities
|
||||||
|
state_color: true
|
||||||
|
entities:
|
||||||
|
- entity: switch.butterfly_edfa_rack_amp_pump
|
||||||
|
name: Pump enable
|
||||||
|
- entity: number.butterfly_edfa_rack_amp_pump_current
|
||||||
|
name: Pump-1 set (≤ 4000 mA ≈ 1 W)
|
||||||
|
- type: gauge
|
||||||
|
entity: sensor.butterfly_edfa_rack_amp_pump_1_current
|
||||||
|
name: Pump-1 current
|
||||||
|
unit: mA
|
||||||
|
needle: true
|
||||||
|
min: 0
|
||||||
|
max: 4000
|
||||||
|
severity:
|
||||||
|
green: 0
|
||||||
|
yellow: 2800
|
||||||
|
red: 3700
|
||||||
|
- type: tile
|
||||||
|
entity: sensor.butterfly_edfa_rack_amp_module_temperature
|
||||||
|
name: Module temp
|
||||||
|
icon: mdi:thermometer
|
||||||
|
|
||||||
|
# ---- Emergency ---------------------------------------------------
|
||||||
|
- type: grid
|
||||||
|
column_span: 3
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
# ===================================================================
|
||||||
|
# VIEW 2 — DIAGNOSTICS & TRENDS
|
||||||
|
# ===================================================================
|
||||||
|
- title: Diagnostics & Trends
|
||||||
|
path: diagnostics
|
||||||
|
icon: mdi:chart-line
|
||||||
|
type: sections
|
||||||
|
max_columns: 3
|
||||||
|
sections:
|
||||||
|
- type: grid
|
||||||
|
column_span: 2
|
||||||
|
cards:
|
||||||
|
- type: heading
|
||||||
|
heading: Trends
|
||||||
|
heading_style: subtitle
|
||||||
|
icon: mdi:chart-line
|
||||||
- type: history-graph
|
- type: history-graph
|
||||||
title: EDFA output & pre-amp PD (mW)
|
title: Output & pre-amp PD (mW)
|
||||||
hours_to_show: 1
|
hours_to_show: 1
|
||||||
entities:
|
entities:
|
||||||
- entity: sensor.butterfly_edfa_rack_output_power_mw
|
- entity: sensor.butterfly_edfa_rack_output_power_mw
|
||||||
name: Output PD
|
name: Output PD
|
||||||
- entity: sensor.butterfly_edfa_rack_pre_amp_power_mw
|
- entity: sensor.butterfly_edfa_rack_pre_amp_power_mw
|
||||||
name: Pre-amp PD
|
name: Pre-amp PD
|
||||||
|
|
||||||
- type: history-graph
|
- type: history-graph
|
||||||
title: EDFA input PD (mW) — seed after attenuators
|
title: EDFA input PD (mW) — seed after attenuators
|
||||||
hours_to_show: 1
|
hours_to_show: 1
|
||||||
entities:
|
entities:
|
||||||
- entity: sensor.butterfly_edfa_rack_amp_input_power_mw
|
- entity: sensor.butterfly_edfa_rack_amp_input_power_mw
|
||||||
name: EDFA input
|
name: EDFA input
|
||||||
|
|
||||||
# Seed-side signal: CTL200 monitor photodiode current. Tracks seed
|
|
||||||
# output relatively; NOT a calibrated optical power.
|
|
||||||
- type: history-graph
|
- type: history-graph
|
||||||
title: Seed monitor PD (mA — relative, uncalibrated)
|
title: Seed monitor PD (mA — relative, uncalibrated)
|
||||||
hours_to_show: 1
|
hours_to_show: 1
|
||||||
entities:
|
entities:
|
||||||
- entity: sensor.butterfly_edfa_rack_seed_photodiode_current
|
- entity: sensor.butterfly_edfa_rack_seed_photodiode_current
|
||||||
name: Seed monitor PD
|
name: Seed monitor PD
|
||||||
|
|
||||||
- type: history-graph
|
- type: history-graph
|
||||||
title: Temperatures (°C)
|
title: Temperatures (°C)
|
||||||
hours_to_show: 1
|
hours_to_show: 1
|
||||||
@@ -50,87 +272,54 @@ views:
|
|||||||
- entity: sensor.butterfly_edfa_rack_amp_pre_amp_temperature
|
- entity: sensor.butterfly_edfa_rack_amp_pre_amp_temperature
|
||||||
name: Amp pre-amp
|
name: Amp pre-amp
|
||||||
|
|
||||||
# ===== Status + headline values =====
|
- type: grid
|
||||||
- type: glance
|
column_span: 1
|
||||||
columns: 3
|
cards:
|
||||||
|
- type: heading
|
||||||
|
heading: Seed detail
|
||||||
|
heading_style: subtitle
|
||||||
|
icon: mdi:alpha-s-circle-outline
|
||||||
|
- type: entities
|
||||||
entities:
|
entities:
|
||||||
- entity: binary_sensor.butterfly_edfa_rack_seed_link
|
- entity: sensor.butterfly_edfa_rack_seed_voltage
|
||||||
name: Seed link
|
name: Seed voltage
|
||||||
- entity: binary_sensor.butterfly_edfa_rack_amp_link
|
- entity: sensor.butterfly_edfa_rack_seed_thermistor
|
||||||
name: Amp link
|
name: Thermistor (actual)
|
||||||
|
- entity: sensor.butterfly_edfa_rack_seed_tec_current
|
||||||
|
name: TEC current
|
||||||
|
- entity: sensor.butterfly_edfa_rack_seed_tec_voltage
|
||||||
|
name: TEC voltage
|
||||||
|
- entity: sensor.butterfly_edfa_rack_seed_board_temperature
|
||||||
|
name: Board temp
|
||||||
|
- entity: sensor.butterfly_edfa_rack_seed_error_code
|
||||||
|
name: Error code
|
||||||
|
- type: heading
|
||||||
|
heading: Amp detail
|
||||||
|
heading_style: subtitle
|
||||||
|
icon: mdi:alpha-b-circle-outline
|
||||||
|
- type: entities
|
||||||
|
entities:
|
||||||
|
- entity: sensor.butterfly_edfa_rack_amp_input_power
|
||||||
|
name: Input power (dBm)
|
||||||
|
- entity: sensor.butterfly_edfa_rack_amp_pre_amp_power
|
||||||
|
name: Pre-amp power (dBm)
|
||||||
|
- entity: sensor.butterfly_edfa_rack_amp_pre_amp_current
|
||||||
|
name: Pre-amp current
|
||||||
|
- entity: sensor.butterfly_edfa_rack_amp_pre_amp_temperature
|
||||||
|
name: Pre-amp temp
|
||||||
|
- entity: sensor.butterfly_edfa_rack_amp_tec_current
|
||||||
|
name: TEC current
|
||||||
- entity: sensor.butterfly_edfa_rack_amp_warnings
|
- entity: sensor.butterfly_edfa_rack_amp_warnings
|
||||||
name: Warnings
|
name: Warnings
|
||||||
|
- type: heading
|
||||||
- type: glance
|
heading: Bridge (ESP32)
|
||||||
title: Power now (internal PDs, indicative)
|
heading_style: subtitle
|
||||||
columns: 3
|
icon: mdi:chip
|
||||||
entities:
|
|
||||||
- entity: sensor.butterfly_edfa_rack_amp_input_power_mw
|
|
||||||
name: EDFA in mW
|
|
||||||
- entity: sensor.butterfly_edfa_rack_output_power
|
|
||||||
name: Out dBm
|
|
||||||
- entity: sensor.butterfly_edfa_rack_output_power_mw
|
|
||||||
name: Out mW
|
|
||||||
|
|
||||||
# ===== Stage 1: seed (Koheron CTL200) =====
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Stage 1 — Seed (turn on FIRST)
|
|
||||||
state_color: true
|
|
||||||
entities:
|
entities:
|
||||||
- entity: switch.butterfly_edfa_rack_seed_laser
|
- entity: sensor.butterfly_edfa_rack_ip_address
|
||||||
name: Seed laser
|
name: IP address
|
||||||
- entity: number.butterfly_edfa_rack_seed_set_current
|
- entity: sensor.butterfly_edfa_rack_wifi_signal
|
||||||
name: Seed current set (<= 300 mA)
|
name: WiFi signal
|
||||||
- entity: sensor.butterfly_edfa_rack_seed_current
|
- entity: sensor.butterfly_edfa_rack_uptime
|
||||||
name: Seed current (actual)
|
name: Uptime
|
||||||
- entity: number.butterfly_edfa_rack_seed_thermistor_setpoint
|
|
||||||
name: Seed temp setpoint (Ω, rtset)
|
|
||||||
- entity: sensor.butterfly_edfa_rack_seed_temperature
|
|
||||||
name: Seed temperature (from thermistor)
|
|
||||||
- entity: sensor.butterfly_edfa_rack_seed_photodiode_current
|
|
||||||
name: Seed monitor PD (mA, relative)
|
|
||||||
|
|
||||||
# ===== Stage 2: booster (Agiltron M511, ACC) =====
|
|
||||||
- type: entities
|
|
||||||
title: Stage 2 — Booster (ACC; ramp gently, settles 2-4 s)
|
|
||||||
state_color: true
|
|
||||||
entities:
|
|
||||||
- entity: switch.butterfly_edfa_rack_amp_pump
|
|
||||||
name: Booster pump enable
|
|
||||||
- entity: number.butterfly_edfa_rack_amp_pump_current
|
|
||||||
name: Pump-1 current set (<= 4000 mA ~ 1 W)
|
|
||||||
- entity: sensor.butterfly_edfa_rack_amp_pump_1_current
|
|
||||||
name: Pump-1 current (actual)
|
|
||||||
- entity: sensor.butterfly_edfa_rack_amp_module_temperature
|
|
||||||
name: Module temp
|
|
||||||
|
|
||||||
# ===== Emergency off =====
|
|
||||||
- type: horizontal-stack
|
|
||||||
cards:
|
|
||||||
- type: button
|
|
||||||
name: PUMP OFF
|
|
||||||
icon: mdi:power-off
|
|
||||||
icon_height: 40px
|
|
||||||
tap_action:
|
|
||||||
action: call-service
|
|
||||||
service: switch.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: switch.butterfly_edfa_rack_amp_pump
|
|
||||||
- type: button
|
|
||||||
name: SEED OFF
|
|
||||||
icon: mdi:power-off
|
|
||||||
icon_height: 40px
|
|
||||||
tap_action:
|
|
||||||
action: call-service
|
|
||||||
service: switch.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: switch.butterfly_edfa_rack_seed_laser
|
|
||||||
- type: button
|
|
||||||
name: SHUTDOWN
|
|
||||||
icon: mdi:alarm-light
|
|
||||||
icon_height: 40px
|
|
||||||
tap_action:
|
|
||||||
action: call-service
|
|
||||||
service: script.butterfly_edfa_shutdown
|
|
||||||
confirmation:
|
|
||||||
text: Ramp pump to 0, disable booster, then seed?
|
|
||||||
|
|||||||
Reference in New Issue
Block a user