mirror of
https://github.com/boneIO-eu/esphome.git
synced 2026-04-10 13:00:27 +02:00
add serial_no id
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
text_sensor:
|
text_sensor:
|
||||||
- platform: template
|
- platform: template
|
||||||
name: 'Serial No.'
|
name: 'Serial No.'
|
||||||
|
id: serial_no
|
||||||
lambda: |-
|
lambda: |-
|
||||||
std::string mac = get_mac_address();
|
std::string mac = get_mac_address();
|
||||||
return to_string("${serial_prefix}") + mac.erase(0, mac.length()/2);
|
return to_string("${serial_prefix}") + mac.erase(0, mac.length()/2);
|
||||||
|
|||||||
Reference in New Issue
Block a user