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

[items] Allow Item lookup by name directly on the items namespace #233

Merged
merged 10 commits into from
Feb 4, 2023

Conversation

digitaldan
Copy link
Contributor

Fixes #232

Signed-off-by: Dan Cunningham dan@digitaldan.com

Fixes openhab#232

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
@digitaldan
Copy link
Contributor Author

Hmm, i need to update the docs as well, i do that shortly

@digitaldan digitaldan added the workinprogress Work in Progress — not completed or tested label Feb 4, 2023
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
@digitaldan digitaldan removed the workinprogress Work in Progress — not completed or tested label Feb 4, 2023
@digitaldan
Copy link
Contributor Author

Ok, was not sure the best way to document in JSDoc, this was the best i could come up with.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 changed the title Allows item lookup by name directly on the item namespace [items ]Allows Item lookup by name directly on the items namespace Feb 4, 2023
@florian-h05 florian-h05 changed the title [items ]Allows Item lookup by name directly on the items namespace [items] Allow Item lookup by name directly on the items namespace Feb 4, 2023
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Instead of returning null as intended, a exception was thrown.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Just a few minor things I will take care of:

  • static Item lookup throws exception if Item is missing instead of returning null as intended
  • README: Add comments to remaining items.getItem calls
  • type def updates
  • CHANGELOG update

@florian-h05 florian-h05 added the enhancement New feature or request label Feb 4, 2023
@florian-h05 florian-h05 added this to the to be released milestone Feb 4, 2023
@florian-h05 florian-h05 merged commit 1611948 into openhab:main Feb 4, 2023
@digitaldan
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add sendCommand and postUpdate to items
2 participants