Code Monkey home page Code Monkey logo

openhab-helper-libraries's People

Contributors

5iver avatar besynnerlig avatar bifbofii avatar bigredbrent avatar conan747 avatar crazyivan359 avatar digitlength avatar diijkstra avatar drscheme123 avatar euphi avatar fivesails avatar gitmiguel avatar herzscheisse-zz avatar jimtng avatar ljr55555 avatar lukicsl avatar marcelerkel avatar mr-eskildsen avatar ralle12345 avatar rick-jongbloed avatar scottkinsf avatar sillyfrog avatar spacemanspiff2007 avatar steve-bate avatar tomtibo avatar vzorglub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

openhab-helper-libraries's Issues

Use Semantics action

Is your feature request related to a problem? Please describe.
OH3 exposes a new action called "Semantics" to access attributes of the new OH3 semantic model, e.g. locations, equipments, points... I tried to use that action in Jython but it failed out of the box (see below).

Describe the solution you'd like
It would be great to use Sematics action like other actions:
from core.actions import Semantics
...
locationItem = Semantics.getLocation(pointItem)

Describe alternatives you've considered
I tried to import the action directly, but failed:
from org.openhab.core.model.script.actions import Semantics
Error during evaluation of script 'file:/etc/openhab/automation/jsr223/python/personal/tests.py': ImportError: cannot import name Semantics

Additional context
Do you know what steps are required to use that new action? Is it required to extend automation/lib/python/core/actions.py?

Triggers are not reloaded on item change

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Add a rule like@when("Member of gMyGroup received update").
  2. Change the members of gMyGroup.
  3. Inspect the triggers via UI.
  4. Added or removed members of the group are not added or removed from the rule triggers.

Expected behavior
All members of the group are part of the rule triggers.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • openHAB version: openHAB 3.1.0 Build #2294
  • Release: master

Set custom rules ID via @rule annotation

As posted in openHAB's community forum, I would like an option to replace the random auto-generated rule IDs with custom IDs defined by the user.

According to @CrazyIvan359 that should be possible (forum):

To anyone interested in adding this: there is a UUID validation function in utils.py already. You would need to add a parameter to the rule function and run that through the validator, accounting of course for it not being supplied or an invalid value being supplied.
I can add this but I don’t know when I will have time right now, but if someone submits a PR tested on OH2 and OH3 then I can pop over and approve it.

I just got started with Python in general and Jython rules in the specific - so it might take some time until I feel comfortable enough with the Helper-Libraries to contribute. But I'm not saying no πŸ˜…
But I would also not be sad if someone else solves that issue in the meantime 😁

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.