[homekit] allow configuring maxValue on VOCDensity (#13508)

* [homekit] allow configuring maxValue on VOCDensity

the default of 1000 is quite low in reality. tested and confirmed
working with iOS 16

* [homekit] allow step value to be configured for VOCDensity

Signed-off-by: Cody Cutrer <cody@cutrer.us>
This commit is contained in:
Cody Cutrer
2022-10-10 05:30:13 -06:00
committed by GitHub
parent 6a27f17611
commit d83c32cd24
2 changed files with 6 additions and 1 deletions

View File

@@ -811,6 +811,11 @@ public class HomekitCharacteristicFactory {
private static VOCDensityCharacteristic createVOCDensityCharacteristic(final HomekitTaggedItem taggedItem,
HomekitAccessoryUpdater updater) {
return new VOCDensityCharacteristic(
taggedItem.getConfigurationAsDouble(HomekitTaggedItem.MIN_VALUE,
VOCDensityCharacteristic.DEFAULT_MIN_VALUE),
taggedItem.getConfigurationAsDouble(HomekitTaggedItem.MAX_VALUE,
VOCDensityCharacteristic.DEFAULT_MAX_VALUE),
taggedItem.getConfigurationAsDouble(HomekitTaggedItem.STEP, VOCDensityCharacteristic.DEFAULT_STEP),
getDoubleSupplier(taggedItem,
taggedItem.getConfigurationAsDouble(HomekitTaggedItem.MIN_VALUE,
VOCDensityCharacteristic.DEFAULT_MIN_VALUE)),