]> git.basschouten.com Git - openhab-addons.git/commitdiff
[homekit] allow configuring maxValue on VOCDensity (#13508)
authorCody Cutrer <cody@cutrer.us>
Mon, 10 Oct 2022 11:30:13 +0000 (05:30 -0600)
committerGitHub <noreply@github.com>
Mon, 10 Oct 2022 11:30:13 +0000 (13:30 +0200)
* [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>
bundles/org.openhab.io.homekit/README.md
bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java

index e0b11932c1a9caa3e00123d7eecf3ce66faf12b7..d952d023d8774a2b937955a14b3da16b0154b4d9 100644 (file)
@@ -550,7 +550,7 @@ Support for this is planned for the future release of openHAB HomeKit binding.
 |                      |                             | SulphurDioxideDensity        | Number                        | SO2 density in micrograms/m3, max 1000                                                                                                                                                                                                                                                                                                              |
 |                      |                             | PM25Density                  | Number                        | PM2.5 micrometer particulate density in micrograms/m3, max 1000                                                                                                                                                                                                                                                                                     |
 |                      |                             | PM10Density                  | Number                        | PM10 micrometer particulate density in micrograms/m3, max 1000                                                                                                                                                                                                                                                                                      |
-|                      |                             | VOCDensity                   | Number                        | VOC Density in micrograms/m3, max 1000                                                                                                                                                                                                                                                                                                              |
+|                      |                             | VOCDensity                   | Number                        | VOC Density in micrograms/m3, default max 1000, supported configuration: minValue, maxValue, step.                                                                                                                                                                                                                                                  |
 |                      |                             | Name                         | String                        | Name of the sensor                                                                                                                                                                                                                                                                                                                                  |
 |                      |                             | ActiveStatus                 | Switch, Contact               | Working status                                                                                                                                                                                                                                                                                                                                      |
 |                      |                             | FaultStatus                  | Switch, Contact               | Fault status                                                                                                                                                                                                                                                                                                                                        |
index 611b7f33e8dbecd33794403dc8ca42d5fe949bf0..9180cc7ccebdefa847ca4c11a0549b4ed0fd7f44 100644 (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)),