* Add an add-on service that provides add-ons in the addons-folder
* fix connection and countries
This is needed to show the add-ons from the addons in the UI.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* Ensure metadata available at start-level 20
This makes the `MetadataRegistry` report when the elements of the `ManagedMetadataProvider` is available via a ready marker (like other registries).
Signed-off-by: Jan N. Klug <github@klug.nrw>
* prevent a provider from removing an element from another provider
if multiple providers provide the same element, the added callback
simply ignores the duplicates. but the provider has no idea its element
was ignored, so it may try to remove it in the future, and things will
get all out of whack if the element is removed from the registry even
if another provider thinks it's still there
this is easily reproducible by creating an item in the UI, then
creating the same item via a .items file, and then removing the item
from the .items file. The item will seem like it is gone to most
of openHAB, but will come back after reboot when the managed
provider re-adds.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
The `AccessController` and the `SecurityManager` is deprecated for removal in Java 17. We don't make use of the `SecurityManager` anyway, so we can safely remove it.
Signed-off-by: Jan N. Klug <github@klug.nrw>
These wrong DataAmount units were added in #3208 for backwards compatibility.
In OH4 we can clean them up because this major version allows for breaking changes.
Signed-off-by: Wouter Born <github@maindrain.net>
Reported on the forum. Due to selection of the `RoundingMode` instead of a `MathContext` the average calculation is returning unexpected results: 19.0 °C / 19.5 °C results in 19.3 °C (instead of 19.25 °C) which might be acceptable, but 19.5 °C / 19.5 °C results in 20 °C (instead of 19.5 °C) which is obviously not what we want or expect. Setting the `MathContext` fixes this problem. I also corrected the same calculation for non-dimensional groups.
Signed-off-by: Jan N. Klug <github@klug.nrw>
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)