The library currently initializes device information fields such as the device name and the newer Device Information values with the string "Unknown".
That makes it hard for downstream integrations to distinguish between:
- a real value read from the bulb, and
- a value that has not been read yet or is not available.
For Home Assistant, this matters because device information such as manufacturer, hardware revision, firmware version, and serial number should only be registered when the value is actually known. A literal "Unknown" string would otherwise be treated as real device metadata and shown in the UI.
Would it make sense to use None as the internal default/sentinel for unavailable values instead of "Unknown"?
Suggested behavior:
- initialize optional device information attributes as
None
- keep returning actual strings when the bulb provides a value
- only use a human-readable fallback like
"Unknown" at presentation boundaries, if needed
This would let downstream consumers reliably check is None for missing metadata without having to special-case the string "Unknown".
The library currently initializes device information fields such as the device name and the newer Device Information values with the string
"Unknown".That makes it hard for downstream integrations to distinguish between:
For Home Assistant, this matters because device information such as manufacturer, hardware revision, firmware version, and serial number should only be registered when the value is actually known. A literal
"Unknown"string would otherwise be treated as real device metadata and shown in the UI.Would it make sense to use
Noneas the internal default/sentinel for unavailable values instead of"Unknown"?Suggested behavior:
None"Unknown"at presentation boundaries, if neededThis would let downstream consumers reliably check
is Nonefor missing metadata without having to special-case the string"Unknown".