* [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>
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>
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>
there are so many shared characteristics now, and so many accessories they belong
to, there is no longer any groupings that make sense. so just sort solely by
characteristic/method name
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* Remove redundant feature dependencies
The following features are already dependencies of openhab-runtime-base:
* openhab-core-base
* openhab-core-model-item
* openhab-core-model-script
* openhab-transport-mdns
See also: https://github.com/openhab/openhab-addons/pull/16202#issuecomment-1876875456
* Remove redundant openhab.tp-jackson and openhab.tp-jaxb feature dependencies
Signed-off-by: Wouter Born <github@maindrain.net>
* Declare missing connection attribute
* change mactts, marytts, and picotts to none for consistency
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* [homekit] unify all enum handling
regardless of if it's a required or optional characteristic,
or even "boolean" enums
then allow number or switch items to be linked with enums
then update the docs listing the numeric value for enums
as part of this, global configuration of thermostat enum values
is no longer supported; you must use metadata.
in particular, for GarageDoorOpener, the global settings didn't
even actually work, so they should work now.
Fixes#13595
* [homekit] default-invert boolean items for garage door states
this was previously handled explicitly by the switch statement.
so need to set the inverted flag now that we're building a
mapping instead
* [homekit] document that CurrentDoorState can be linked to a Contact item
* [homekit] improve docs on invert param to createMapping
also fix a new helper method not properly passing through the inverted
param
Signed-off-by: Cody Cutrer <cody@cutrer.us>