Giter Site home page Giter Site logo

Comments (1)

5iver avatar 5iver commented on August 16, 2024

If this was a bug, which I do not believe it to be, it should not be reported in the Jython helper libraries but openhab-core. The forum would be the best place to discuss this, where it's been discussed before.

event.itemState is reporting the state that the Item was updated to, which can be PercentType, UpDiownType, or UnDefTyoe. When reading the state of the Item, you will need to specify the format that you'd like it in or accept the type that you get. To specify PercentType, then you need to ask for it with...

event.itemState.as(PercentType)

You can also request UpDownType...

event.itemState.as(UpDownType)

... but be careful, since you will get None if the value is not 0 or 100. Read through this... https://www.openhab.org/docs/concepts/items.html#a-note-on-items-which-accept-multiple-state-data-types.

from openhab-helper-libraries.

Related Issues (20)

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.