3 from __future__
import annotations
5 from pywizlight
import BulbType
6 from pywizlight.bulblibrary
import BulbClass
8 from .const
import DEFAULT_NAME
12 """Get the short mac address from the full mac."""
13 return mac.replace(
":",
"").upper()[-6:]
17 """Generate a name from bulb_type and mac."""
18 if bulb_type.bulb_type == BulbClass.RGB:
19 if bulb_type.white_channels == 2:
20 description =
"RGBWW Tunable"
22 description =
"RGBW Tunable"
24 description = bulb_type.bulb_type.value
25 return f
"{DEFAULT_NAME} {description} {_short_mac(mac)}"
str name_from_bulb_type_and_mac(BulbType bulb_type, str mac)