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>
326 lines
12 KiB
YAML
326 lines
12 KiB
YAML
# Butterfly EDFA Rack (MOPA) — laser control panel.
|
|
# Registered in configuration.yaml (lovelace: dashboards: butterfly-rack).
|
|
#
|
|
# 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
|
|
views:
|
|
# ===================================================================
|
|
# VIEW 1 — CONTROL PANEL
|
|
# ===================================================================
|
|
- title: Control
|
|
path: control
|
|
icon: mdi:laser-pointer
|
|
type: sections
|
|
max_columns: 3
|
|
sections:
|
|
# ---- Rack status -------------------------------------------------
|
|
- type: grid
|
|
column_span: 3
|
|
cards:
|
|
- type: heading
|
|
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:
|
|
- 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
|
|
title: Output & pre-amp PD (mW)
|
|
hours_to_show: 1
|
|
entities:
|
|
- entity: sensor.butterfly_edfa_rack_output_power_mw
|
|
name: Output PD
|
|
- entity: sensor.butterfly_edfa_rack_pre_amp_power_mw
|
|
name: Pre-amp PD
|
|
- type: history-graph
|
|
title: EDFA input PD (mW) — seed after attenuators
|
|
hours_to_show: 1
|
|
entities:
|
|
- entity: sensor.butterfly_edfa_rack_amp_input_power_mw
|
|
name: EDFA input
|
|
- type: history-graph
|
|
title: Seed monitor PD (mA — relative, uncalibrated)
|
|
hours_to_show: 1
|
|
entities:
|
|
- entity: sensor.butterfly_edfa_rack_seed_photodiode_current
|
|
name: Seed monitor PD
|
|
- type: history-graph
|
|
title: Temperatures (°C)
|
|
hours_to_show: 1
|
|
entities:
|
|
- entity: sensor.butterfly_edfa_rack_seed_temperature
|
|
name: Seed
|
|
- entity: sensor.butterfly_edfa_rack_seed_board_temperature
|
|
name: Seed board
|
|
- entity: sensor.butterfly_edfa_rack_amp_module_temperature
|
|
name: Amp module
|
|
- entity: sensor.butterfly_edfa_rack_amp_pre_amp_temperature
|
|
name: Amp pre-amp
|
|
|
|
- type: grid
|
|
column_span: 1
|
|
cards:
|
|
- type: heading
|
|
heading: Seed detail
|
|
heading_style: subtitle
|
|
icon: mdi:alpha-s-circle-outline
|
|
- type: entities
|
|
entities:
|
|
- entity: sensor.butterfly_edfa_rack_seed_voltage
|
|
name: Seed voltage
|
|
- entity: sensor.butterfly_edfa_rack_seed_thermistor
|
|
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
|
|
name: Warnings
|
|
- type: heading
|
|
heading: Bridge (ESP32)
|
|
heading_style: subtitle
|
|
icon: mdi:chip
|
|
- type: entities
|
|
entities:
|
|
- entity: sensor.butterfly_edfa_rack_ip_address
|
|
name: IP address
|
|
- entity: sensor.butterfly_edfa_rack_wifi_signal
|
|
name: WiFi signal
|
|
- entity: sensor.butterfly_edfa_rack_uptime
|
|
name: Uptime
|