Skip to content

Ambient temperature and color temperature both reported under the same key#15

Description

@japsu

So today I installed some IKEA Tr氓dfri bulbs and immediately my alerts tell me my house is on fire. Like, 4000 degrees on fire. 馃敟馃殥

Turns out device["state"]["temperature"] can be either ambient temperature (degrees Celsius) or color temperature (degrees Kelvin), depending on the device. They can be distinguished by having either "COLOR_TEMP" or "TEMPERATURE" in device["capabilities"]["values"] (but can there be a device that has both?).

Not sure if this should be fixed in the Cozify API instead of this library, but I bet this is something that affects many users of this library, and having the heuristic in the library would save us from replicating this heuristic everywhere that needs to distinguish ambient temperature from color temperature.

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions