So explicitly add the *nix-style path to the syspath, so that
even on Windows the installed packages can be found.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
ComponentChannel.Builder automatically adds -advanced to the
type if is an advanced child, so bring the definitions in the XML
inline with that for gps-accuracy.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* use fully OSGI-ified Graal dependencies
* add js-scriptengine dep
* [jsscripting] Set OSGi DynamicImport-Package header to allow host class loading from JS
* [jsscripting] Remove not-needed feature dependencies, use POM property for version
* [jsscripting] Remove not-needed dependencies from POM, noEmbedDependencies.profile not needed anymore
* [pythonscripting] Use POM property for feature dependency versions
* [pythonscripting] Remove/Change scope of dependencies in POM, noEmbedDependencies.profile not needed anymore
* Upgrade to GraalVM 24.2.1
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Co-authored-by: Florian Hotze <dev@florianhotze.com>
This allows the helper library to have a dependency on the
openHAB version, allowing us to drop support for older
openHAB versions without doing a major version bump (and thus
possibly requiring the user to make changes to their config
to get a new major version).
Signed-off-by: Cody Cutrer <cody@cutrer.us>
So that they'll always be added in a consistent order. Otherwise we might
accidentally change the order (and thus the IID) of a characteristic, but
not actually detect that it's different and signal Home to reload accessory
structures.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
getConfigurationAsQuantity was using toUnitRelative appropriately,
but the final conversion to Celsius was not, resulting in a 1 °F
step being interpreted as a -17.5 °C step!
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Because of how it shares a channel, whenever openHAB was rebooted and it
would first restore the device trigger components from the channel configuration,
and then from the MQTT message, it didn't identify it as the same component
as before, and so would merge into another instance of itself. My Things.json
is normally 13MB, and had grown to 545MB, and my openHAB was constantly having
memory issues! So now just make sure we only keep unique information, which
will automatically clean up anyone in a bad state.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [mqtt.homeassistant] Update Jinjava to 2.7.4
Which includes support for break/continue, which is what Zigbee2MQTT's
new event component uses in their template.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* update bndrun file
Signed-off-by: Cody Cutrer <cody@cutrer.us>
---------
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [mqtt.homeassistant] fix duplicate component resolution when unique_id is set
unique_id is only unique per component type. so we need to a) take that into
account, and b) use that when resolving duplicates
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [homekit] add Doorbell Service
this is _not_ sufficient for HomeKit to present a doorbell.
it just shows as an unsupported accessory with the house icon,
Signed-off-by: Cody Cutrer <cody@cutrer.us>
but only for newStyleChannels, which is already a breaking change of
most channels getting renamed for 4.3 anyway
Signed-off-by: Cody Cutrer <cody@cutrer.us>
if multiple DeviceTrigger components share a topic, and each
has a payload value configured, only messages matching that
payload should be delivered to the corresponding channel
Signed-off-by: Cody Cutrer <cody@cutrer.us>
In particular, use the color_mode attribute to tell us which color space to parse in,
instead of trying to guess. Some devices will fill out attributes not-pertinent to
the current color mode, and their math might be... less than optimal.
Also sync color temp and color channels when the color_mode is the opposite.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [mqtt.homeassistant] Fix jinja usage in availability templates
Use the local Jinjava, instead of implicitly depending on the Jinja
transformation service.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
While it's useful in general to not have to copy/paste a MQTT message into a JSON
parser to verify syntax, it also includes details about fields that are the wrong
data type that a generic JSON parser won't catch. A la #17375.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Just default it to OFF if it's not linked. The experience in Home
app is still decent - it says "Cool to X", "Heat to X", or
"Set to X", instead of "Cooling to X", "Heating to X" if it was
actually running. I thought about defaulting it to "HEAT" or "COOL"
depending on the current target mode, but if it's set to "AUTO",
that's not a valid state for the current mode.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [jpa] Fix restoring quantity types
Double.parseDouble throws NumberFormatException if the persisted state
includes a unit. So parse it as a QuantityType, and then apply unit
conversions as necessary.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
In #17137, CurrentDoorState and TargetDoorState were moved from being part
of the accessory itself, to using the CharacteristicFactory, but they lost the
flag that default-inverts them. So make sure to pass that flag in the new location
that the mapping is created.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Depending on how the accessory initializes, optional characteristics
may be added before or after the service. For IrrigationSystem, it's
added before optional characteristics.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
this is especially important when linking a many-valued enum (such as
CurrentHeatingCoolingState) to a switch, and you want to use a value
beyond 0 and 1 (i.e. OFF (0) and COOL (2)).
Signed-off-by: Cody Cutrer <cody@cutrer.us>
this allows using switches and contacts for enums without additional configuration
if they already line up well with the first two values (such as they do for a
thermostat, when it represents a simple heater)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
allow configuring such an accessory, and it's up to the user to be okay
with how the Home app deals with it
Signed-off-by: Cody Cutrer <cody@cutrer.us>
To simplify linking to "simple" things that don't have it.
It will just always return "not obstructed" if not linked
Signed-off-by: Cody Cutrer <cody@cutrer.us>
also supports adding multiple of them in a group, by supporting ServiceIndex
as an optional characteristic
refs #9969
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [homekit] fix temperature unit conversion for min/max/step
use the item's unit if it has one. or allow explicit units
Signed-off-by: Cody Cutrer <cody@cutrer.us>