Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[homekit] ColorTemperature Characteristic - item Dimmer not supported #12517

Closed
grzegorz914 opened this issue Mar 25, 2022 · 3 comments
Closed
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@grzegorz914
Copy link

grzegorz914 commented Mar 25, 2022

Hi,

if use Dimmer with ColorTemperature Characteristic get error:

2022-03-25 16:18:28.618 [WARN ] [ssories.HomekitCharacteristicFactory] - Item type Dimmer is not supported for LEDKorytarzSypialnia_tempvalue. Only NumberItem is supported.

Any chance to add it.?

@hww3
Copy link

hww3 commented Mar 25, 2022

Hi-

I have run into similar situations where only NumberItems are supported but (for certain types of item) where a DimmerItem might be more natural. I've been testing a change to extend the types of allowable items to speaker accessories, so I think I might be able to come up with a fix to test for this (I don't currently have a color adjustable light set up so I'd need some help testing it out). I'll make a note to look at it this weekend.

@hww3
Copy link

hww3 commented Mar 29, 2022

I looked into this a bit further and think this may be tricky to have actually work. I dug out a RGBW lightify LED that has a color temperature channel. This is normally expressed in mireds, which in my case is a value between 50 and 400. That's also the unit that HomeKit expects color temperature to be expressed. If I link that channel to a dimmer item, I get a slider in the UI with a range from 50 and 400. That's handy. The problem is that dimmer items only accept PercentType commands, which are restricted to values between 0 and 100. So on the UI front, that slider becomes uncontrollable over a large portion of its range.

I did look at the HomeKitCharacteristicFactory and added code to map the range between minValue and maxValue to a percentage between 0 and 100. That seems to work, and might even be handy. However it relies on the min and max being set properly, and would still probably not work unless the item were scaled to a 0-100 value, so might cause more confusion. I suppose if you were using something like the MQTT binding that allowed you to transform the values in/out that might work.
Could you describe your setup a bit more as well as how/why you're using a DimmerItem in this application?

@yfre
Copy link
Contributor

yfre commented Nov 14, 2022

closing this as the requested enhancement was implemented by @ccutrer is available in the latest 3.4M4 (https://github.com/openhab/openhab-distro/releases/tag/3.4.0.M4) and will be part of next release
please open a bug report is this still no working with M4 or 3.4 release

@yfre yfre closed this as completed Nov 14, 2022
@ccutrer ccutrer linked a pull request Dec 29, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

No branches or pull requests

3 participants