-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[hue] Update example (item Kitchen_Wallplate_Switch_Last_Event) #15656
Conversation
Under demo.items the button-last-event channel was of the Number type. I have changed this to String. In the channels for devices section this was already corrected but is not 'live' yet? Signed-off-by: Gemertw <59452423+Gemertw@users.noreply.github.com>
@openhab/add-ons-maintainers : I have a doubt: can an item be linked to a trigger channel ? |
No. |
Thank you. So the proper documentation fix will be to remove this item, not to fix its type. |
Umm. @kai I am not sure that your statement is correct. You can certainly link a a String item to a Trigger channel by means of a profile. I think this was what the creator of this PR is getting at. The button trigger channels produce a numeric value e.g. 1002 indicating the button id and the button press type, and this can be linked to a String type item via a profile. |
But there is no profile used in the example? |
Correct. So probably the correct answer for this PR is not to delete the example, but rather to modify it to also include a profile element in the item definition. Or? |
Ok. |
I am not currently at home, but from SSH into my system I can see that I do have String Items connected to such Trigger channels (by means of a profile) where the profile used is the default profile type (namely String) and since this is the default type, it does not need to be explicitly declared in the .items file entry. So -- in other words -- the changes to the example that are proposed here by the OP, do in fact work correctly. (Albeit perhaps not for the reasons that one might expect...)
|
I am not using a profile either and have this working for several wall switches in the same way as the example of @andrewfg.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the comments IMHO LGTM
https://www.openhab.org/docs/configuration/items.html#profiles For
For
Considering what you are noticing, the documentation is wrong ? @openhab/core-maintainers : do you know where is the code in core framework that applies a profile per default to channel links ? We could check what is really implemented and then fix the documentation. |
Yes I think so. For trigger channels it appears that it defaults to 'trigger-event-string' if no other profile is explicitly specified. |
@lolodomo the respective code line is HERE which confirms that the default profile for trigger channels is indeed @lolodomo if you agree with this, then I am happy to create a PR to fix the doc. => Please let me know. |
Yes, please do it. |
@lolodomo - done - see openhab/openhab-docs#2141 |
Under demo.items the button-last-event channel was of the Number type. I have changed this to String. In the channels for devices section this was already corrected but is not 'live' yet? Signed-off-by: Gemertw <59452423+Gemertw@users.noreply.github.com>
Under demo.items the button-last-event channel was of the Number type. I have changed this to String. In the channels for devices section this was already corrected but is not 'live' yet? Signed-off-by: Gemertw <59452423+Gemertw@users.noreply.github.com> Signed-off-by: querdenker2k <querdenker2k@gmx.de>
Under demo.items the button-last-event channel was of the Number type. I have changed this to String. In the channels for devices section this was already corrected but is not 'live' yet? Signed-off-by: Gemertw <59452423+Gemertw@users.noreply.github.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Under demo.items the button-last-event channel was of the Number type. I have changed this to String. In the channels for devices section this was already corrected but is not 'live' yet?