Skip to content

Add CO2 measurement and control capabilities - #2

Merged
philipostli merged 11 commits into
philipostli:mainfrom
AreAArseth:main
Feb 22, 2026
Merged

philipostli merged 11 commits into
philipostli:mainfrom
AreAArseth:main

Conversation

@AreAArseth

Copy link
Copy Markdown
Contributor

Including home and awaylimits, to the SwegonCasa driver. Update related enums and settings in the application.

Tested on my own Homey and my Casa with CO2 sensor.


Note

Adds CO2 sensor capability and CO2 Home/Away limit settings, wiring them through the SwegonCasa driver, client, and enums/constants.

  • Driver (SwegonCasa):
    • Measurements: Handle CO2 readings; add/remove measure_co2 capability and update its value in MeasurementHandler and ensure capability in device.ts.
    • Settings: Sync new co2HomeLimit and co2AwayLimit to device via SettingsHandler and set defaults in device.ts.
    • Client: Subscribe to and emit CO2 measurements; read/emit CO2HomeLimit and CO2AwayLimit settings in SwegonClient and SwegonConstants.
  • App/Compose:
    • Add capability measure_co2 and its definition (.homeycompose/capabilities/measure_co2.json, app.json, driver.compose.json).
    • Add settings group "CO2 Control" with co2HomeLimit and co2AwayLimit (app.json, driver.settings.compose.json).
  • Types/Constants:
    • Extend enums: MeasurementType.CO2, SettingType.CO2HomeLimit, SettingType.CO2AwayLimit.
    • Map object IDs: SwegonObjectId.CO2, CO2HomeLimit, CO2AwayLimit; update subscriptions.

Written by Cursor Bugbot for commit bd51d20. This will update automatically on new commits. Configure here.

AreAArseth and others added 11 commits December 19, 2025 22:07
… limits, to the SwegonCasa driver. Update related enums and settings in the application.
Add CO2 measurement and control capabilities
… SwegonCasa driver. Implement triggers for temperature and ventilation level changes, and register new action and condition cards for improved control. Update localization files for additional terms.
…mate mode conditions to improve clarity and accuracy.
…e control in app.json; update build script in package.json and output directory in tsconfig.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…guration

- Updated TypeScript and ESLint dependencies in package.json for better compatibility and features.
- Modified ESLint configuration to extend from 'athom/homey-app' and added .eslintrc.js to ignore itself.
- Enhanced error handling in SwegonCasa driver and SwegonClient by adding catch blocks to promise-based methods.
- Updated app.ts to standardize temperature and ventilation type references.
- Added new entries to .eslintignore for better linting control.
…nsistency

- Updated variable names from `temperatureType` and `ventilationType` to `temperature_type` and `ventilation_type` to align with naming conventions.
- Ensured all related flow trigger and condition listeners reflect these changes for improved clarity and maintainability.

@philipostli philipostli left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good to me.

@philipostli
philipostli merged commit 4558601 into philipostli:main Feb 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants