add serial_prefix to config

This commit is contained in:
pszafer
2024-05-27 20:32:25 +02:00
parent 8412fb6fe5
commit 206a1912f2
16 changed files with 47 additions and 20 deletions

9
devices/serial_no.yaml Normal file
View File

@@ -0,0 +1,9 @@
text_sensor:
- platform: template
name: 'Serial No.'
lambda: |-
std::string mac = get_mac_address();
return to_string("${serial_prefix}") + mac.erase(0, mac.length()/2);
icon: mdi:expansion-card-variant
entity_category: diagnostic
update_interval: 60min