Skip to content

Use None instead of "Unknown" as default for unavailable device information #51

Description

@pattyland

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions