In the Prometheus docs here it says that you can do stuff like
sensor.*_bat:
override_metric: battery_percent
which seem to override all sensor.*_bat and rename them to “battery_percent” I’ve got a PDU that gets exposed like this:
Port A1 current
Port A1 wattage
Port A1 voltage
Port A2 current
Port A2 wattage
Port A2 voltage
Port A3 current
Port A3 wattage
Port A3 voltage
etc. What I’d like to do is rename them so that its more like
NAS voltage
NAS current
NAS wattage
Switch voltage
Switch Current
Switch wattage
Router voltage
Router Current
Router Wattage
Etc. Am i correct in thinking I can do something like
prometheus:
namespace: hass
component_config_glob:
sensor.pdu_outlet_a1_*:
override_metric: NAS
sensor.pdu_outlet_a2_*:
override_metric: Switch
sensor.pdu_outlet_a3_*:
override_metric: Router
? basically I want to try and find a way to rename
sensor.pdu_outlet_a1_current
sensor.pdu_outlet_a1_power
sensor.pdu_outlet_a1_voltage
to
sensor.nas_current
sensor.nas_power
sensor.nas_voltage
without going in to all of the entities and renaming them all (there are 28 entities per PDU, so I’d have to change like 56 things.
Thanks!