Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[homekit] allow configuring maxValue on VOCDensity #13508

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bundles/org.openhab.io.homekit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,11 @@ private static PM10DensityCharacteristic createPM10DensityCharacteristic(final H
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)),
Expand Down