Comments (1)
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)
- Remove "Member of" and "System started" triggers
- core.metadata get_metadata duplicate lines of code HOT 2
- Add a module for storing data to persistent storage
- [Area Triggers and Actions] Make "99/100" state override configurable HOT 2
- [Area Triggers and Actions] Refactor light_action HOT 2
- [Area Triggers and Actions] light_action throws exceptions HOT 2
- [Area Triggers and Actions] Configurable brightness method for light_action HOT 1
- Return missing in utils.js Line 206 HOT 1
- Add syntactic sugar in rules to check if item maintains state for specified duration HOT 7
- timer_example.py link in documentation is a 404. HOT 1
- [utils] kw function is broken
- The WeatherStationUploader community script is obsolete and should be removed HOT 2
- _DirectoryEventTriggerHandlerFactory doesn't work HOT 3
- Javascript doesn't works with current OH 3.0 daily build
- openhab-helper-libraries/Getting Started/Installation suggestions HOT 2
- [actions] LogAction was renamed to Log in OH 3.0
- joda.time is no longer part of the OpenHab 3 Core HOT 2
- Openhab 3 . Channel Trigger WHEN error / MQTT action HOT 5
- WHEN Trigger for Things HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openhab-helper-libraries.