this is a useful helper that can eliminate some complicated code elsewhere.
starting in SystemOffsetProfile. then I also want to use it in the homekit
addon.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Pattern %s will match <hue>,<saturation>,<brightness>
Pattern %hsb% will match <hue>,<saturation>,<brightness>
Pattern %rgb% will match <red>,<green>,<blue>
Related to discussion in openhab/openhab-webui#427
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Fix missing stateDescriptionProvider in Group items
The stateDescriptionProvider was not properly passed to the base item. Because of that units set in the state description were not properly used when setting the group state after calculating aggregation functions.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* fix invertible unit conversions when sent via a binding
* do invertible unit conversion in ItemUIRegistry
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* Support mired units
Mired are fairly common to describe the color temperature of
lightbulbs (slightly less common than Kelvin), but are very
useful for various calculations when adjusting the color
temperature, as well as being necessary for various integerations
that require mired units.
This commit makes them a well-known unit (previously they were
still usable, using "MK^-1"), as well as making them easier to
work with on QuantityType. The hiccup is that Mireds aren't
technically a Temperature dimension, because they're a reciprocal.
So add a `inverse` method that delegates to javax.measure's
same method, and then use it as necessary when doing unit
conversions and comparisons. Unfortunately, because the
dimension changes, the return value of a conversion won't
necessarily be the same type, an additional method is added
for callers that are willing to handle the change in
dimension. This is implemented for all callers that can use
it in core.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* New translations automation.properties (Italian)
* New translations restauth.properties (German)
* New translations restauth.properties (Italian)
* New translations addons.properties (Italian)
* New translations restauth.properties (Danish)
* New translations restauth.properties (Finnish)
* New translations restauth.properties (Hungarian)
* New translations restauth.properties (Polish)
Unregistered trackers aren't clear, so then we never register new trackers,
and thus never get notified of any changes.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* New translations messages.properties (Danish)
* New translations audio.properties (Danish)
* New translations inbox.properties (Danish)
* New translations addons.properties (Danish)
* New translations persistence.properties (Danish)
* New translations lsp.properties (Danish)
* New translations sitemap.properties (Danish)
* New translations SystemThingStatusInfos.properties (Danish)
* [expiry] [expire] bool configuration parameters parsing as util method
* [expiry] [expire] extend ExpiryManager to allow ignoring commands
Similar to ignoreStateUpdates parameter, this introduces new optional
parameter ignoreCommands.
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* New translations DefaultSystemChannels.properties (Italian)
* New translations DefaultSystemChannels.properties (Dutch)
* New translations DefaultSystemChannels.properties (Polish)
* New translations DefaultSystemChannels.properties (Finnish)
* New translations DefaultSystemChannels.properties (Hebrew)
* New translations DefaultSystemChannels.properties (German)
* New translations DefaultSystemChannels.properties (Hungarian)
* New translations addons.properties (Hungarian)
* New translations marketplace.properties (Hungarian)
This fixes the build being broken when building on Windows.
It also contains many fixes for timing issues which seem to impact macOS and Windows more than Linux.
* Fix .gitattributes and add *.xml_gen to fix line ending issues on Windows
* Derive fork count from CPU details in org.openhab.core tests for more stable tests on machines with fewer cores
* Adjust SafeCallerImplTest timings
* Increase ExecUtilTest timeout
* Increase SchedulerImplTest timeouts
* Increase AudioConsoleTest serveStream timeout
* Increase AudioServletTest serveStream timeout
* Increase SchedulerImplTest test timeouts
* Increase ExpireManagerTest timeout used for checking published events
* Increase PeriodicSchedulerImplTest max allowed delta
* Increase SchedulerImplTest timeouts
* Fix BundleInfoReader file stream not closed causing temp dir deletion issues on Windows
* Fix GenerateDefaultTranslationsMojoTest Windows line endings issues
* Fix GenerateDefaultTranslationsMojoTest Windows temp dir deletion problem
* Fix GenericItemProviderTest tearDown sometimes fails because of queued events
* Fix ChannelLinkNotifierOSGiTest wait for channel link events
* Fix ChannelCommandDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix ChannelStateDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix GenericItemChannelLinkProviderTest not waiting for async updated state to become true
* Fix GenericThingProviderTest failing due to events of previous test
* Fix InboxOSGiTest sometimes fails because of queued events
* Fix ScriptEngineOSGiTest failing because items are not yet added to registry
* Fix ThingManagerOSGiTest failing due to async handleRemoval call
Signed-off-by: Wouter Born <github@maindrain.net>
An Angle is also Dimensionless and because it is the first compatible unit it is always returned instead of any other Dimensionless unit.
With these changes `getDimensionName` will prefer the dimension of equal units over those of compatible units.
Fixes#2880
Signed-off-by: Wouter Born <github@maindrain.net>
* New translations marketplace.properties (Greek)
* New translations validation.properties (Greek)
* New translations SystemThingStatusInfos.properties (Greek)
* New translations DefaultSystemChannels.properties (Greek)
* New translations addons.properties (Greek)
* New translations voice.properties (Greek)
* New translations DefaultSystemChannels.properties (Finnish)
* New translations DefaultSystemChannels.properties (Dutch)
* New translations marketplace.properties (Polish)
* New translations SystemThingStatusInfos.properties (Polish)
* New translations validation.properties (Polish)
* New translations voice.properties (Polish)
* New translations DefaultSystemChannels.properties (Italian)
* New translations DefaultSystemChannels.properties (Polish)
* New translations DefaultSystemChannels.properties (Hebrew)
* New translations DefaultSystemChannels.properties (German)
* New translations marketplace.properties (French)
* New translations DefaultSystemChannels.properties (French)
* New translations addons.properties (French)
* New translations marketplace.properties (French)
* New translations addons.properties (Dutch)
* New translations addons.properties (Finnish)
* New translations addons.properties (German)
* New translations addons.properties (Hebrew)
* New translations addons.properties (Italian)
* New translations addons.properties (Polish)
* New translations marketplace.properties (Dutch)
* New translations marketplace.properties (Finnish)
* New translations marketplace.properties (German)
* New translations marketplace.properties (Hebrew)
* New translations marketplace.properties (Italian)
* New translations SystemThingStatusInfos.properties (Bulgarian)
* New translations units.properties (Catalan)
This makes it possible to use Crowdin for translating the new configuration options introduced in #2811.
Signed-off-by: Wouter Born <github@maindrain.net>
* Improve PeridodicSchedulerImplTest
The old implementation truncated timestamps to 1/10 s. Under some circumstances this could result in a failed tests:
offset = 201 -> truncatedOffset = 2
200ms delay expected, adjustment calculation results in an actual delay of 198ms
time = 399 -> truncatedTime = 3
expected: truncatedOffset + expected => 2 + 2 = 4
actual: truncatedTime = 3
The new implementation allows for an error of +/- 10ms which is far more than needed.
* increase tolerance
* fix consecutive executions build up errors
Signed-off-by: Jan N. Klug <github@klug.nrw>
This saves about 1 minute when building this bundle.
Most bundles depend on org.openhab.core so cores would stay idle until this bundle is build in a parallel builds.
Signed-off-by: Wouter Born <github@maindrain.net>
Since no requirements are defined for `STARTLEVEL_COMPLETE´ no `ReadyMarker` was added to the map of `ReadyMarker`s.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* Add more null annotations to automation bundles. This adds null annotations to many classes in the automation bundles and a few dimension classes.
* Further cleanup AutomationCommandExport
* Remove null from RuleStatusInfo JavaDocs. This should be clear from how the class is now annotated.
* Validate deserialized RuleStatusInfo
* Allow TriggerHandlerCallback to be triggered without providing a context
Signed-off-by: Wouter Born <github@maindrain.net>