Commit Graph

2068 Commits

Author SHA1 Message Date
jimtng
83b069d970
Revert "Insert context keys before compiling UI scripts (#4372)" (#4373)
This reverts commit 6e6f000800.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-09-10 07:52:16 +02:00
J-N-K
53889cdcdb
Add a PersistenceService bundle tracker (#4324)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-09-09 20:06:15 +02:00
jimtng
6e6f000800
Insert context keys before compiling UI scripts (#4372)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-09-09 19:23:57 +02:00
jimtng
69dc83237b
Support offset in DateTimeTrigger (#4271)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-09-08 07:54:45 +02:00
lolodomo
3e912eca4b
Fix translation of label for system:addons service (#4306)
The i18n file containing this label is in org.openhab.core bundle.

Fix openhab/openhab-webui#1669

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-09-08 06:13:58 +02:00
lolodomo
edf5b62213
[sitemap] Remove snedFrequency parameter for Slider/Colorpicker widgets (#4347)
Related to #4338

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-09-07 18:41:52 +02:00
jimtng
5cf91cde1b
Filter out blank lines and comments in a multi-line transformations (#4357)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-09-07 06:59:22 +02:00
jimtng
1145613cba
Support space-separated date/time format for DateTimeType (#4370)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-09-06 22:44:20 +02:00
jimtng
72753be8cc
Add time series support for script profile (#4365)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-31 11:49:46 +02:00
jimtng
8a59844451
Add isTransform(), isEmpty() and isPresent() to ChannelTransformation (#4355)
* Add isEmpty() and isPresent() to ChannelTransformation
* Add isValidTransformation helper method

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-30 18:47:55 +02:00
jimtng
66d55f77b5
Make DateTimeType Comparable (#4364)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-28 18:11:02 +02:00
jimtng
8d54ccefef
Add MEDIAN group function (#4344)
* Add MEDIAN group function

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-24 14:39:39 +02:00
jimtng
e8e55443c3
Add tests for null-returning transformations in ChannelTransformationTest (#4356)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-24 10:59:21 +02:00
jimtng
17ad247519
Rename parameter of ChannelHandler (#4361)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-24 10:58:19 +02:00
Mark Herwege
b63fa473b3
Median action in persistence extensions (#4345)
* median persistence extension

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-08-24 10:55:06 +02:00
jimtng
b8e0f94cb0
Add missing ScriptProfile parameter options (#4360)
for commandFromItemScript and stateFromItemScript

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-21 19:42:12 +02:00
jimtng
506ccd4f4d
Support channel transformation chaining with a list (#4353)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-18 18:36:36 +02:00
jimtng
bb2a2d10dc
Support channel transformations with parentheses (#4352)
* Support channel transformations with parentheses

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-18 17:05:32 +02:00
Holger Friedrich
0e1883bdae
Fix CodeQL warnings (#4348)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-08-17 14:57:45 +02:00
Holger Friedrich
fc454883c2
Reduce SAT warnings (#4339)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-08-11 10:04:26 +02:00
Cody Cutrer
716045a174
Support lists for metadata properties in items files (#4330)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-08-05 23:19:30 +02:00
Florian Hotze
6d174a91c2
Fix favicon for authorize/login page (#4335)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-04 18:11:01 +02:00
Florian Hotze
1ce5b378d3
Icon servlet: Set Cache-Control header to enable icon caching (#4336)
I have removed the Modified-Since handling as it did not have an effect due to the missing Cache-Control header,
and instead added Cache-Control with a max-age set.
This enables "forever" caching of icons, which should be fine since they are static assets.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-04 17:33:06 +02:00
lolodomo
289f06378d
Config parameter: Change inferred i18n key for add-ons + alternative key (#4305)
Fix openhab/openhab-webui#2641

The i18n key for add-on configuration parameter should now start with addon.config.<param>.
To maintain compatibility with hundreds of existing translations, an alternative key starting with <type>.config.<param> is still accepted for an add-on parameter

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-08-04 13:13:15 +02:00
jimtng
cb19001af0
Clean up removed links in GenericItemChannelLinkProvider (#4326)
* Clean up removed links in GenericItemChannelLinkProvider
* defer processing until stopConfigurationUpdate is called

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-07-27 18:38:06 +02:00
Florian Hotze
e1574488b6
[rules] Don't attempt to pre-compile disabled rules (#4329)
Fixes an issue, where an error that compilation failed for disabled rules.
Reported on the community: https://community.openhab.org/t/oh-4-2-snapshot-disabled-rules-failed-to-compile-error-in-opehab-log/157402.
Follow-up for #4289.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-24 20:18:49 +02:00
joerg1985
f502e9d4e3
Use a precompiled pattern in ChannelUID.validateSegment (#4327)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-07-23 08:30:24 +02:00
J-N-K
8557666f0a
Add test to ensure full mapping of types in AbstractStorageBasedProvider (#4318)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-07-22 15:07:28 +02:00
lolodomo
0a5886c7e7
Fix startup of background discovery (#4323)
Apply the same logic in AbstractThingHandlerDiscoveryService as in AbstractDiscoveryService to determine if background discovery should be enabled or disabled.

Fix openhab/openhab-addons#17089

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-17 19:50:51 +02:00
J-N-K
6f0add09ba
Add missing system profile types and UIDs (#4320)
* Add missing system profile types and UIDs

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-07-16 22:52:25 +02:00
Florian Hotze
f631f1bbca
[rules] Remove leftover from #4289 (#4319) 2024-07-14 22:28:38 +02:00
lolodomo
9f80bbf0a7
Add default scope to profile when loading items file (#4314)
* Add default scope to profile when loading items file

Fix #4277

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-14 20:28:11 +02:00
Anders Alfredsson
98554af952
Add unitHint to AbstractStorageBasedTypeProvider.ChannelTypeEntity (#4317)
* Add unitHint to AbstractStorageBasedTypeProvider.ChannelTypeEntity

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
2024-07-14 20:18:03 +02:00
lolodomo
9d4ec613a2
Add a warning log to mention the field when configuration parsing is failing (#4311)
Fixes #4248

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-14 10:06:41 +02:00
lolodomo
24d1ba0b2a
Fix merge of AddonInfo (masterAddonInfo field) (#4309)
This fix allows having translated label for bindings when showing list of installed bindings in Main UI parameters.

Fix openhab/openhab-webui#2639

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-13 15:32:47 +02:00
lolodomo
71b50c5462
Fix dynamic binding of AddonService to ConsoleCommandExtension service (#4312)
Fix #4146

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-13 15:11:17 +02:00
jimtng
8cc267afd8
Fix Timer.isRunning() returning true immediately after rescheduling (#4313)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-07-13 15:10:31 +02:00
Florian Hotze
918b4faa3b
[rules] Add support for pre-compilation of conditions and actions (#4289)
* ScriptConditionHandler/ScriptActionHandler: Add support for pre-compilation of scripts

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-09 19:12:33 +02:00
jimtng
ea7d61b199
PersistenceExtensions: fix DateTimeException when persisting an empty TimeSeries (#4303)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-07-08 19:53:01 +02:00
Kai Kreuzer
21e605d212
Apply spotless after release, resolve bundles (#4301)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-07-07 23:22:27 +02:00
openhab-bot
07e23eac3c [unleash-maven-plugin] Preparation for next development cycle. 2024-07-07 16:05:56 +00:00
Jacob Laursen
340996f971
Fix TimeSeries policy REPLACE not being applied (#4298)
Fixes #4297

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-07-06 20:38:20 +02:00
J-N-K
87ad314c02
Fix AccessDeniedException in YamlModelRepository (#4299)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-07-06 20:35:06 +02:00
openhab-bot
5710ee4962
New Crowdin updates (#4300)
* New translations addons.properties (German)

* New translations i18n.properties (German)
2024-07-06 16:58:43 +02:00
lolodomo
b932a4df5e
YAML files: ignore files inside automation sub-folder (#4291)
Also ignore unreachable files

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-04 17:35:45 +02:00
openhab-bot
2be44d1cb2
New Crowdin updates (#4292)
* New translations i18n.properties (Hungarian)

* New translations voice.properties (French)

* New translations addons.properties (French)

* New translations restauth.properties (French)

* New translations i18n.properties (French)

* New translations i18n.properties (Danish)

* New translations defaultsystemchannels.properties (Finnish)

* New translations addons.properties (Finnish)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)

* New translations i18n.properties (Hebrew)

* New translations i18n.properties (Dutch)

* New translations addons.properties (French)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)
2024-07-03 21:20:39 +02:00
Mark Herwege
1e53c5235b
Fix persistence extensions for group items and number dimension items with different units (#4257)
* fix persistence extensions for group items

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-07-02 09:27:36 +02:00
lolodomo
37e09f5ab8
Fix description of the location setting (#4286)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-02 08:40:47 +02:00
joerg1985
cef917fac9
Ensure the PoolBasedSequentialScheduledExecutorService does keep a minimum size (#4288)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-07-01 22:26:27 +02:00
mlobstein
425d0f43f2
Fix parsing of mac address in SDDP Discovery (#4284)
* Fix SDDP mac address

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
2024-07-01 17:56:08 +02:00
openhab-bot
d2489bb65e
New Crowdin updates (#4290)
* New translations network.properties (French)
* New translations marketplace.properties (French)
2024-07-01 17:49:02 +02:00
openhab-bot
1a33e23fef
New Crowdin updates (#4285)
* New translations validation.properties (Dutch)

* New translations addons.properties (Dutch)

* New translations voice.properties (Dutch)

* New translations automation.properties (Dutch)

* New translations scriptprofile.properties (Dutch)

* New translations units.properties (Dutch)

* New translations systemprofiles.properties (Dutch)

* New translations defaultsystemchannels.properties (Dutch)

* New translations chart.properties (Dutch)

* New translations magic.properties (Dutch)

* New translations jsr223.properties (Dutch)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)
2024-06-30 10:38:54 +02:00
lolodomo
d22e14a1e4
Make input formatting for transformations consistent everywhere (#4203)
Use item state formatter to format input of transformation, meaning using state.format(format) instead of String.format(format, state.toString())
This was already the case in sitemap API but not in other APIs used by Main UI.

Make sure to call transformation even for NULL and UNDEF states.
It was not the case in one API used by Main UI.

When calling transformation and state is NULL or UNDEF, do not apply format to the input value and do not replace by "-".
That means the transformation will be called with "NULL" or "UNDEF".
Sitemap API was calling the transformation using a pattern containing "-".

Fix #4101
Also related to discussion in openhab/openhab-addons#13777

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-06-26 21:25:13 +02:00
Mark Herwege
cb65e41445
Persistence extensions, add lastChange and nextChange (#4259)
* add lastChange and nextChange

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-25 13:46:54 +02:00
lsiepel
93b53e7847
Extend Stringutils with padRight (#4279)
* Add padRight
* Fix edge cases

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
2024-06-24 21:06:15 +02:00
openhab-bot
f150e8dd50
New Crowdin updates (#4280)
* New translations units.properties (French)

* New translations chart.properties (French)

* New translations voice.properties (French)

* New translations defaultsystemchannels.properties (French)

* New translations addons.properties (French)

* New translations voice.properties (French)

* New translations voice.properties (Hebrew)

* New translations voice.properties (Hungarian)
2024-06-24 20:04:47 +02:00
GiviMAD
2e77bbc6f9
[voice] Avoid text concatenation on speech recognition errors (#4278)
* [voice] Remove recognition error extra text and skip empty

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-06-23 23:06:19 +02:00
GiviMAD
5578de155f
[voice] Add hlis argument to interpret command (#4281)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-06-23 23:02:32 +02:00
jimtng
9b39f625e8
RulesDSL: add triggeringGroup and triggeringGroupName to rule context (#4273)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-06-23 18:40:17 +02:00
joerg1985
2aacdcd4e8
Fixed a deadlock in the PoolBasedSequentialScheduledExecutorService (#4247)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-06-10 20:39:11 +02:00
Andrew Fiddian-Green
8e3ca9db44
SddpDevice provide JavaDoc for fields (#4270)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2024-06-09 00:24:58 +02:00
Florian Hotze
f7f4b7653c
PersistenceExtensions: Support state as string for persist method (#4268)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-05 18:30:36 +02:00
Mark Herwege
d092c517f0
Fix persist with date method (#4267)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-05 18:14:52 +02:00
Andrew Fiddian-Green
5f1b708f27
Fix closing bracket in JavaDoc (#4265)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2024-06-01 23:22:27 +02:00
openhab-bot
7198c123a3
New Crowdin updates (#4261)
* New translations addons.properties (Hungarian)

* New translations defaultsystemchannels.properties (Hungarian)

* New translations addons.properties (Danish)

* New translations addons.properties (Italian)

* New translations chart.properties (Finnish)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)

* New translations addons.properties (Hebrew)
2024-06-01 10:45:27 +02:00
mlobstein
940a9905db
Add support for SDDP IDENTIFY packets (#4263)
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
2024-06-01 10:15:59 +02:00
Mark Herwege
8aa6b28104
fix ip suggestion finder default param (#4262)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-31 12:41:23 +02:00
Andrew Fiddian-Green
c5336c5618
New SDDP service for addon discovery and thing discovery (#4237)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2024-05-30 21:03:58 +02:00
joerg1985
9068ab2fac
[serial] Use a fast path to avoid pattern matching (#4255)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-05-28 23:53:02 +02:00
lolodomo
a5a7eee9a8
Ephemeris: consider the default weekend dayset (#4253)
Fix openhab/openhab-addons#16812

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-27 22:34:54 +02:00
J-N-K
4b4f25d31b
Add support for marketplace transformations (#4216)
* Add support for marketplace transformations

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-26 16:06:44 +02:00
lolodomo
ad74d5a296
Fix a wrongly failing validation rule for sitemap (#4240)
Problem introduced by #4223

checkFramesInWidgetList for LinkableWidget was triggering an error when the Buttongrid element has no parameter set.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-26 16:02:54 +02:00
Jacob Laursen
3bacc4bb5d
Change icon for channel type system.mute (#4245)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-05-25 18:53:15 +02:00
openhab-bot
08b5dd1ba0
New translations systemprofiles.properties (Danish) (#4250) 2024-05-25 18:38:13 +02:00
Holger Friedrich
43b57eb9e9
String translations for IP add-on finder (#4232)
Translate backslash sequences in requestPlain.
See String.translateEscapes().

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-23 19:10:45 +02:00
openhab-bot
945900b52a
New Crowdin updates (#4243)
* New translations chart.properties (Hebrew)

* New translations voice.properties (Hebrew)

* New translations magic.properties (Hebrew)

* New translations jsr223.properties (Hebrew)

* New translations defaultsystemchannels.properties (Hebrew)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)
2024-05-23 15:39:11 +02:00
openhab-bot
dcc3842386
New Crowdin updates (#4236)
* New translations addons.properties (Hungarian)

* New translations scriptprofile.properties (Hungarian)

* New translations systemprofiles.properties (Hungarian)

* New translations chart.properties (Hungarian)

* New translations voice.properties (Hungarian)

* New translations magic.properties (Hungarian)

* New translations jsr223.properties (Hungarian)

* New translations defaultsystemchannels.properties (Danish)
2024-05-22 21:27:54 +02:00
Timotheos Constambeys
83bd5fff2e
Fix brightness in generic ColorChannelHandler (#4242)
Signed-off-by: Timotheos Constambeys <timo0190@gmail.com>
2024-05-22 18:08:34 +02:00
Holger Friedrich
873bb53cbc
Upgrade Karaf from 4.4.5 to 4.4.6 (#4181)
* Upgrade Karaf from 4.4.5 to 4.4.6

* Sync runtime dependencies with Karaf 4.4.6, most notably:
  * Jetty 9.4.54.v20240208, addresses CVE-2024-22201
  * Pax Logging 2.2.7
  * Pax Web 8.0.27
  * ASM 9.7
  * BouncyCastle 1.77
* Upgrade xtext to 2.35.0.M1
* Resolve itest runbundles

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-20 17:42:04 +02:00
Gaël L'hopital
6887db3b89
Adding UV Index system channel (#3878)
* Adding UV Index system channel

Signed-off-by: clinique <gael@lhopital.org>
2024-05-20 12:09:52 +02:00
Mark Herwege
c40b82f16e
Fix exception in WindowsUsbSerialDiscovery (#4235)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-20 10:20:08 +02:00
J-N-K
895dcbb087
Enable spotless for schema XSD (#4218)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-18 19:23:21 +02:00
Holger Friedrich
352dbf2aaa
Update i18n property files (#4229)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-18 18:43:53 +02:00
Mark Herwege
6b5eed782c
fix QuantityType dimensionless one and time formatting (#4169)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-18 14:54:18 +02:00
lolodomo
3b9a97101b
[sitemap] Buttongrid as container for new Button elements (#4223)
Related to #4173

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-18 14:51:39 +02:00
J-N-K
73f4722b91
Align I18nProviderImpl and thing description XSD (#4233)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-18 13:08:22 +02:00
J-N-K
88c5a0849f
Improve thing description XSD (#4217)
* Improve thing description XSD

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-17 23:17:13 +02:00
lolodomo
965e7311eb
[sitemap] Do not try to convert item state into OnOffType for Switch widget if item has options (#4226)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-13 22:20:59 +02:00
Jacob Laursen
3b2757a25e
Add IP broadcast add-on finder for suggestions (#4036)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-05-12 16:14:46 +02:00
GiviMAD
e14b0a8d0d
[audio|voice] Add console commands to troubleshoot audio sources and speech-to-text services (#4202)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-05-12 12:25:46 +02:00
J-N-K
ec7674752a
Fix resolver errors during bundle add-on installation (#4224)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-11 19:15:31 +02:00
jimtng
6eeb9dd7c9
Fix a typo in PersistenceExtensions log message (#4221)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-05-07 08:09:36 +02:00
Mark Herwege
03a9708b6c
Persistence extensions: allow null serviceId (#4213)
* allow null serviceId

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-06 11:28:57 +02:00
jimtng
456d5d3dd0
Fix textual things not updating on the first change (#4219)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-05-06 09:24:04 +02:00
Mark Herwege
d083a5379c
Support press and release buttons in sitemap generator (#4204)
* handle quoted arguments
* press and release mapping

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-05 22:16:36 +02:00
lolodomo
b40e6db514
Extend sitemap syntax for switch to support press & release buttons (#4183)
* Extend sitemap syntax for switch to support press & release buttons

Mappings attribute for switch element now accepts one or two commands for each button.
If only one command is provided, the button is a click button, the command is sent to the item when the button is clicked.
If two commands are provided (separated by ":"), the button is a press & release button, the first command is sent to the item when the button is pressed and the second when the button is released.

Syntax example for a click button: Switch item=DemoSwitch mappings=[ ON="ON" ]
Syntax example for a press & release button: Switch item=DemoSwitch mappings=[ ON:OFF="ON" ]

Related to #3822

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-05 09:45:24 +02:00
joerg1985
6aed435c77
Prevent potential incorrect cache lookup due to hash collisions (#4214)
* Prevent potential incorrect cache lookup due to hash collisions
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-05-05 09:39:34 +02:00
joerg1985
7efdd44197
Reuse existing BigDecimals in rules while converting types (#4198)
* Speed up calculations in rules
* Add test for NumberExtensions.numberToBigDecimal

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Co-authored-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-04 18:59:29 +02:00
lolodomo
97cedc46e9
SseItemStatesEvent displayState: priority to transform over options (#4193)
Fix #2283
Fix #4050

This PR is fixing two things in the computation of the displayState:
- If a transformation is present in the state pattern, it has now priority over options provided by the state description
- If no transformation is present in state pattern but options are provided by the state description, the provided state pattern is applied to the matching option

Also remove a deprecated call to transform.

If there is no transformation but options are provided without any matching with the current state and there is a pattern provided, then this pattern is used to format the output.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-04 18:38:48 +02:00
Mark Herwege
49cfb20fb5
Fix suggestion finder installation (#4209)
* fix finder installation
* no install/uninstall if no config object

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-04 18:18:50 +02:00