openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

Add min/max colour temperature capabilities to channel state descriptions #17638

Open andrewfg opened 2 hours ago

andrewfg commented 2 hours ago

Several bindings which support colour temperature absolute channels (i.e. channels for a colour temperature in Kelvin) should have the absolute minimum and maximum Kelvin colour temperature capabilities added to their state descriptions. This should be done:

  1. either, statically in the channel type description xml,
  2. or, dynamically in code via a channel state description provider

See the discussion here https://github.com/openhab/openhab-core/issues/3891

The following bindings are foreseen to have this update:

Depends on https://github.com/openhab/openhab-core/pull/4420 Depends on https://github.com/openhab/openhab-core/pull/4429

andrewfg commented 2 hours ago

@lolodomo for info..

andrewfg commented 11 minutes ago

Having now studied the code of the bindings mentioned above, the following is my proposed list of actions:

AVMFritz

Supports fixed min/max of 2700 K / 6500 K. Action: modify the channel type xml description.

AmazonEcho

Supports fixed min/max of 1000 K / 10000 K. The system.color-temperature-abs uses this range, so continue to use it (i.e. no further action needed).

Dali

Supports fixed min/max of 1000 K / 20000 K. The current maximum colour temperature in ColorUtil is 10000 K. Proposed Action: continue to use system.color-temperature-abs (i.e. no further action needed).

Deconz

Supports dynamic min/max in Kelvin. Already implements a dynamic state description provider (i.e. no further action needed)

Govee

Supports fixed min/max of 2000 K / 9000 K. Action: modify the channel type xml description.

Hue

Supports dynamic min/max in Kelvin. Implement a dynamic state description provider -- already work in progress -- see #17637

MQTT:EspMiLightBulb

Supports dynamic min/max in Mirek!! @lolodomo can you please give your thoughts if your PR can read the min/max in Mirek? Or shall we modify the binding to use Kelvin as a base unit? https://github.com/openhab/openhab-addons/blob/abe819978feec579f26e94d9f4f4cff9b7ba3b76/bundles/org.openhab.binding.mqtt.espmilighthub/src/main/java/org/openhab/binding/mqtt/espmilighthub/internal/EspMilightStateDescriptionProvider.java#L64

NanoLeaf

Supports dynamic min/max in Kelvin. Action: implement a dynamic state description provider.

Zigbee

Supports dynamic min/max in Kelvin. Action: implement a dynamic state description provider.