Update nspanel_esphome_core.yaml
try to make the device name respect name_add_mac_suffix
This commit is contained in:
@@ -1621,7 +1621,15 @@ text_sensor:
|
||||
entity_category: diagnostic
|
||||
internal: false
|
||||
disabled_by_default: false
|
||||
lambda: return {"${name}"};
|
||||
lambda: |-
|
||||
if !(${name_add_mac_suffix}) {
|
||||
return {"${name}"};
|
||||
} else {
|
||||
byte mac[6];
|
||||
WiFi.macAddress(mac);
|
||||
String suffix = String(mac[3],HEX) + String(mac[4],HEX) + String(mac[5],HEX);
|
||||
return {"${name}-" + suffix};
|
||||
}
|
||||
filters:
|
||||
- lambda: |-
|
||||
std::string result;
|
||||
|
||||
Reference in New Issue
Block a user