Comments (4)
First you have to understand in which cases this default pattern will be used, there are only two cases:
- you have an item that is not linked to any channel and of course without any pattern defined on the item itself
- you have an item linked to a channel but the binding developer made a bad decision and did not define a default pattern for this channel, and of course without any pattern defined on the item itself
Additionally, for the second case (no pattern defined by the channel), I can also tell you that the default %.0f was there since many many years.
So yes, if you link one item to a channel, the channel provider should provide a proper default pattern and this default would be for example "%.1f %unit%" for a temperature. In case the channel does not provide a default pattern, you can of course define one on your item if the default does not match your need.
In practice, this default pattern is mainly for items that the user do not link to any channel.
from openhab-core.
And to answer to your question, the %.0f was chosen for two reasons:
- It was the value requested in the feature request
- It made sense to maintain a backward compatibility due to previous default pattern set on channel level.
from openhab-core.
It was the value requested in the feature request
I have not thought on the number of digits, but have seen this is default value somewhere. The rationale is that some value has to be selected as default.
from openhab-core.
Thanks for the explanation.
from openhab-core.
Related Issues (20)
- After upgrade to 4.2 units are not rendered implicitly in sitemaps HOT 12
- Inline group members instead of a subpage HOT 2
- Rules / PersistenceExtensions / "no queryable persistence service registered" / should use default rrd4j HOT 8
- [Enhancement/Support] HTTP feature "Transition feature for backward compatibility"
- Remove parameter `sendFrequency` HOT 6
- OpenAPI schema is not in line with REST API
- Median as group function.
- Caclulate the median of persistent data. HOT 2
- Add system channel for `Radiant Exposure` / `energy per unit area` HOT 1
- QuantityType<Temperature> misbehaviour HOT 4
- Autogenerated? Handle command HOT 7
- Rollershutter slider has incorrect value HOT 9
- PersistenceExtensions ignores item persistence aliases HOT 8
- Add profile support to i18n-maven-plugin HOT 1
- Profile transformation "thing" to "item of datetime type" is not working HOT 6
- JSR223: Include automationManager in the Default preset HOT 2
- [ColorUtil] Add conversions between colour temperature and CIE XY colour space coordinates
- Nightly openHAB builds failing to start HOT 4
- Zwave Controller won't enter exclusion mode, resets instead HOT 14
- Add a new category resp. icon for "Car" / "Automobile"
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-core.