Home Assistant Unofficial Reference
2024.12.1
utils.py
Go to the documentation of this file.
1
"""Utility functions for the Bluesound component."""
2
3
from
homeassistant.helpers.device_registry
import
format_mac
4
5
6
def
format_unique_id
(mac: str, port: int) -> str:
7
"""Generate a unique ID based on the MAC address and port number."""
8
return
f
"{format_mac(mac)}-{port}"
homeassistant.components.bluesound.utils.format_unique_id
str format_unique_id(str mac, int port)
Definition:
utils.py:6
homeassistant.helpers.device_registry
Definition:
device_registry.py:1
core
homeassistant
components
bluesound
utils.py
Generated by
1.9.1