The repo bridges both instruments (Koheron CTL200 seed + Agiltron M511 EDFA), so 'koheron-esp32-bridge' was too narrow. Align the repo name and descriptions to the identifier the whole stack already uses (butterfly_edfa_rack): README title, Makefile/platformio headers, and the homeassistant/ copies. Device id, MQTT topics and entity ids are unchanged, so no reflash or lost HA history. Sibling HA repo renamed to butterfly-edfa-rack-homeassistant. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
56 lines
2.3 KiB
YAML
56 lines
2.3 KiB
YAML
# Butterfly EDFA Rack — snippet to merge into Home Assistant's configuration.yaml.
|
|
# These are top-level keys; add them alongside your existing config (the rack's
|
|
# sensors/switches/numbers come in automatically over MQTT discovery, so only
|
|
# the derived mW power sensors and the dashboard registration live here).
|
|
#
|
|
# The internal PDs read ~0.5 dB optimistic, so the mW figures are indicative.
|
|
|
|
mqtt:
|
|
sensor:
|
|
- name: "Output Power mW"
|
|
unique_id: butterfly_edfa_rack_out_mw
|
|
state_topic: "lab/laser/butterfly_edfa_rack/amp/output1_power_dbm"
|
|
value_template: "{{ (10 ** (value | float / 10)) | round(1) }}"
|
|
unit_of_measurement: "mW"
|
|
device_class: power
|
|
state_class: measurement
|
|
availability_topic: "lab/laser/butterfly_edfa_rack/availability"
|
|
payload_available: "online"
|
|
payload_not_available: "offline"
|
|
device: { identifiers: ["butterfly_edfa_rack"] }
|
|
# EDFA input PD = seed AFTER the external attenuators (not seed output power).
|
|
- name: "Amp Input Power mW"
|
|
unique_id: butterfly_edfa_rack_ampin_mw
|
|
state_topic: "lab/laser/butterfly_edfa_rack/amp/input_power_dbm"
|
|
value_template: "{{ (10 ** (value | float / 10)) | round(3) }}"
|
|
unit_of_measurement: "mW"
|
|
device_class: power
|
|
state_class: measurement
|
|
availability_topic: "lab/laser/butterfly_edfa_rack/availability"
|
|
payload_available: "online"
|
|
payload_not_available: "offline"
|
|
device: { identifiers: ["butterfly_edfa_rack"] }
|
|
- name: "Pre-amp Power mW"
|
|
unique_id: butterfly_edfa_rack_preamp_mw
|
|
state_topic: "lab/laser/butterfly_edfa_rack/amp/preamp_power_dbm"
|
|
value_template: "{{ (10 ** (value | float / 10)) | round(1) }}"
|
|
unit_of_measurement: "mW"
|
|
device_class: power
|
|
state_class: measurement
|
|
availability_topic: "lab/laser/butterfly_edfa_rack/availability"
|
|
payload_available: "online"
|
|
payload_not_available: "offline"
|
|
device: { identifiers: ["butterfly_edfa_rack"] }
|
|
|
|
# YAML-mode dashboard registration. Points at ui-lovelace-butterfly.yaml, which
|
|
# must sit next to configuration.yaml in the HA config directory.
|
|
lovelace:
|
|
mode: storage
|
|
dashboards:
|
|
butterfly-rack:
|
|
mode: yaml
|
|
title: Butterfly EDFA Rack
|
|
icon: mdi:laser-pointer
|
|
show_in_sidebar: true
|
|
filename: ui-lovelace-butterfly.yaml
|