* 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>
* Fix Marketplace add-on range pattern matching
With this fix it will use the correct string for pattern matching add-on version ranges introduced in #2811.
Signed-off-by: Wouter Born <github@maindrain.net>
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>
* Raise source level to Java 17 (except for model classes)
* Remove Nashorn script engine
* Upgrade spotless and add jvm options
See https://github.com/diffplug/spotless/issues/834
* Add suppression for findBugs false positive error
* Upgrade xtext to 2.29.0
* Adjust JNA
* Resolve itests
Signed-off-by: Jan N. Klug <github@klug.nrw>
* New translations DefaultSystemChannels.properties (French)
* New translations restauth.properties (French)
* New translations voice.properties (French)
* Fix wrong websocket topics
The topics of the websocket event did not follow the openHAB convention of starting with `openhab/` followed by the component.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* [voice] Add notification sounds to dialog processor
* [audio] add actions and commands to play melodies
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
So that they can vary their processing based on the item or channeluid itself,
instead of (or in addition to) solely on the prior states passing through it.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
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>
The `migrateThingType` call the managed thing provider directly instead of checking if it's actually a managed thing.
This check is done in the `thingUpdated` method. Changed the code so it makes the same call as in `thingUpdated`.
Also-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>