1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-12 08:12:22 +01:00

[helpers] Add `format_mac_address_pretty` function, migrate components (#9193)

This commit is contained in:
Keith Burzinski
2025-06-24 19:36:33 -05:00
committed by GitHub
parent 2df0ebd895
commit 9f831e91b3
12 changed files with 41 additions and 60 deletions

View File

@@ -402,6 +402,8 @@ template<typename T, enable_if_t<std::is_unsigned<T>::value, int> = 0> optional<
return parse_hex<T>(str.c_str(), str.length());
}
/// Format the six-byte array \p mac into a MAC address.
std::string format_mac_address_pretty(const uint8_t mac[6]);
/// Format the byte array \p data of length \p len in lowercased hex.
std::string format_hex(const uint8_t *data, size_t length);
/// Format the vector \p data in lowercased hex.