Add support for Corentium Home 2 and Renew - #91
Merged
michaelahern merged 4 commits intoApr 25, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds device metadata and service-selection logic to support additional Airthings models (Corentium Home 2 and Renew), including handling devices that do not report battery data.
Changes:
- Add new device serial prefixes (
3250,4100) and introduce asensors.batterycapability flag inAirthingsDeviceInfo. - Only expose the HomeKit Battery service when the device is marked as having a battery and the user hasn’t disabled it.
- Update README supported-devices table to include the new models.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/plugin.ts | Gates Battery service exposure behind device.sensors.battery + existing batteryDisabled config. |
| src/device.ts | Adds battery capability to sensor metadata and new mappings for Corentium Home 2 / Renew prefixes. |
| README.md | Adds Corentium Home 2 and Renew to the supported devices table and fixes table formatting. |
Comments suppressed due to low confidence (1)
src/device.ts:178
- In the
defaultdevice mapping,sensors.batteryis set tofalse, which means the Battery service will no longer be exposed for any unrecognized serial prefixes (even if the Airthings API returnsbatteryPercentage). Previously, battery was shown for all devices unlessbatteryDisabledwas set. Consider defaultingbatterytotrueforUnknown, or deriving battery support from API data so unknown-but-compatible devices don’t regress.
return {
model: 'Unknown',
sensors: {
battery: false,
co2: false,
humidity: false,
mold: false,
pm1: false,
pm25: false,
pressure: false,
radonShortTermAvg: false,
temp: false,
voc: false
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
Thanks for the contribution @LaStrada! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renew doesn't have batteries, so added a
batteryconfig as well.