Hello everyone,
During my tests on the daikin-onecta plugin for matterbridge, I can see the On/Off switch in Gladys, as well as the 2 set temperatures (1 for the air conditioning mode and 1 for the heating mode):
The mode selection was not visible in Gladys, although on the Apple Home app I could see the modes. Here are screenshots of what I can see: (The fan and dehumidifier modes are missing, but I can’t say if the problem comes from the plugin or from Apple not being able to handle these 2 modes).
Here’s a brief summary by AI between the features of Gladys and Matterbridge:
@pierre-gilles I’m unfortunately at the limit of my knowledge to make this compatible.
Do you think you might have a bit of time to take a look?
Thanks
So the situation has evolved since then, as the FanControl cluster is now managed by Gladys! (But no one had tested the development, so we’re iterating on this topic: Matter : Investigation ventilateur Dyson Matterbridge )
For ModeSelect, I can take care of it yes
Thanks to the new supported_options recently developed, I was able to develop this feature!
To test, I propose a Docker image:
ghcr.io/gladysassistant/gladys-preview:cursor-matter-ac-mode-management-fb55
The PR:
GladysAssistant:master ← GladysAssistant:cursor/matter-ac-mode-management-fb55
ouvert 09:57AM - 20 Jul 26 UTC
## Description
Adds air conditioner operating mode management to the Matter int… egration, as requested on the community forum: https://community.gladysassistant.com/t/matter-climatiseur-gestion-des-modes/10225
Air conditioners exposed over Matter (e.g. Daikin units bridged through Matterbridge) expose their operating mode through the `Thermostat` cluster `SystemMode` attribute. Until now, Gladys only handled the local temperature and the heating/cooling setpoints, so the mode selector visible in Apple Home was missing in Gladys.
### Server (`server/services/matter`)
- New `utils/thermostatMatterMapping.js`: bidirectional mapping between Matter `SystemMode` (Off/Auto/Cool/Heat/EmergencyHeat/Precooling/FanOnly/Dry/Sleep) and Gladys `AC_MODE` (Auto/Cooling/Heating/Drying/Fan), plus `getAcModeSupportedOptions` which builds the feature `supported_options` from the Thermostat cluster capabilities (Auto only when the cluster has the `AutoMode` feature, Heat only with the `Heating` feature; Dry/FanOnly have no Matter capability flag and are always exposed on cooling devices).
- `convertToGladysDevice`: devices whose Thermostat cluster supports the `cooling` feature now expose an `air-conditioning/mode` feature (`:mode` external id suffix) with its `supported_options` (persisted via the mechanism introduced in #2567), and `min`/`max` derived from them.
- `matter.listenToStateChange`: subscribes to `SystemMode` attribute changes and emits the mapped Gladys AC mode (values without a Gladys equivalent, such as `Off`, are ignored — on/off is handled by the `OnOff` cluster).
- `matter.readInitialDeviceStates`: reads the initial `SystemMode` value on startup.
- `matter.setValue`: writes the `SystemMode` attribute when the user changes the mode from Gladys.
- README compatibility table updated.
### Server (core fix)
- `utils/normalizeSupportedOptions.js`: strip the DB metadata fields (`device_feature_id`, `created_at`, `updated_at`) from `supported_options` payloads. Devices fetched from the API include the full `DeviceFeatureSupportedOption` rows, so re-saving a device from an integration page failed validation with `"[0].device_feature_id" is not allowed` (found while testing this PR end-to-end).
### Front
- `AirConditioningModeDeviceFeature` now renders the mode buttons dynamically from the feature `supported_options` (sorted by `sort_order`, labels translated per mode with the stored label as fallback). Features without `supported_options` (e.g. existing MELCloud devices) keep the previous behavior: Auto/Cool/Heat, plus Dry/Fan when the feature `max` covers them.
- New `drying`/`fan` translations added to `en`, `fr`, and `de`.
## Tests
- New unit tests for `thermostatMatterMapping` (all mappings, unknown-value branches, and supported options per capability combination).
- Updated/extended tests for `convertToGladysDevice`, `listenToStateChange`, `readInitialDeviceStates`, `setValue`, `matter.init` and `normalizeSupportedOptions` (metadata stripping round-trip).
- `npm run coverage` on the server passes (4337 tests), with 100% line coverage on every touched file. Front `prettier-check`, `eslint`, `compare-translations`, `build` and the full Cypress suite pass.
## End-to-end validation
Tested against **two real Matter nodes** built with matter.js and commissioned into Gladys through the Matter integration UI/API:
- a Room Air Conditioner with Thermostat `Heating + Cooling + AutoMode` → Mode feature with 5 supported options (Auto, Cool, Heat, Dry, Fan);
- a second one with `Heating + Cooling` only (no AutoMode) → Mode feature with 4 supported options (no Auto).
The options are persisted in `t_device_feature_supported_option`:
```
matter-1-1-513-mode|0|Auto|0 matter-2-1-513-mode|1|Cool|0
matter-1-1-513-mode|1|Cool|1 matter-2-1-513-mode|2|Heat|1
matter-1-1-513-mode|2|Heat|2 matter-2-1-513-mode|3|Dry|2
matter-1-1-513-mode|3|Dry|3 matter-2-1-513-mode|4|Fan|3
matter-1-1-513-mode|4|Fan|4
```
The dashboard widget follows them — the first device shows 5 buttons, the second only 4 (no Auto), and clicking a mode writes the correct Matter `SystemMode` to each device:
[matter_ac_supported_options_demo.mp4](https://cursor.com/agents/bc-6057d516-266d-490e-8877-6dc49a82fb55/artifacts?path=%2Fopt%2Fcursor%2Fartifacts%2Fmatter_ac_supported_options_demo.mp4)
```
[VIRTUAL-AC] systemMode changed to 1 (Auto)
[VIRTUAL-AC] systemMode changed to 8 (Dry)
[VIRTUAL-AC-NOAUTO] systemMode changed to 3 (Cool)
[VIRTUAL-AC-NOAUTO] systemMode changed to 7 (FanOnly)
```
[Paired Matter AC device card with Mode feature](https://cursor.com/agents/bc-6057d516-266d-490e-8877-6dc49a82fb55/artifacts?path=%2Fopt%2Fcursor%2Fartifacts%2Fmatter_device_card_with_mode_feature.webp)
<sub>To show artifacts inline, <a href="https://cursor.com/dashboard/cloud-agents#my-pull-requests">enable</a> in settings.</sub>
<div><a href="https://cursor.com/agents/bc-6057d516-266d-490e-8877-6dc49a82fb55"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-6057d516-266d-490e-8877-6dc49a82fb55"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
## Summary by CodeRabbit
* **New Features**
* Added Matter thermostat HVAC operating mode control (Auto/Cooling/Heating/Drying/Fan) with mode availability derived from the device’s supported options and kept in sync.
* Unified AC mode selection so all mode buttons update through the same flow.
* **Documentation**
* Updated Matter thermostat documentation to describe HVAC system modes.
* **Bug Fixes**
* Improved supported-option saving by stripping database metadata from option objects.
* Skip unknown/unmapped thermostat system modes and ignore unsupported app mode values to prevent incorrect updates.
* **Localization**
* Added/extended English, French, and German labels for the new drying and fan modes.
Thanks @pierre-gilles
I wanted to test with the daikin plugin made by the factory but I’m having a problem since the 3.10.0 update of matterbridge
I wanted the AI to look into it but apparently something is broken because the AI hasn’t touched the plugin
ouvert 04:03PM - 08 May 26 UTC
ready-for-testing
### Device/Service Name
Daikin_Onecta
### Existing Integrations & Documentatio… n
HomeBridge plugin : https://www.npmjs.com/package/@mp-consulting/homebridge-daikin-cloud (recent update)
Github project that controls this device : https://github.com/Apollon77/daikin-controller-cloud (last update 1 year)
### Device Capabilities
On/Off control
Change thermostat (temperature)
Air Conditioning Mode (Heating, Cooling or Auto)
### Additional Context
Authentication on Homebridge is presented as follows, step by step; therefore, the same process should be replicated with the callback URL:
<img width="775" height="627" alt="Image" src="https://github.com/user-attachments/assets/cab99f57-75fe-4467-8d0a-09f4c765a21e" />
<img width="791" height="762" alt="Image" src="https://github.com/user-attachments/assets/cf000d2d-49f2-4be2-9787-82e18eab16cc" />
<img width="679" height="924" alt="Image" src="https://github.com/user-attachments/assets/03f1dc27-92ff-45da-a34b-d13f84b6c87d" />
<img width="1041" height="677" alt="Image" src="https://github.com/user-attachments/assets/61ee8c27-2c94-446c-b9f6-871fb8e845e8" />
<img width="758" height="677" alt="Image" src="https://github.com/user-attachments/assets/d04ea8d5-6b7e-4bf8-b710-6ac0e76fa7a6" />
<img width="761" height="369" alt="Image" src="https://github.com/user-attachments/assets/e0d4f6d9-150f-4e6d-9d40-5425b14b78c8" />
### Confirmations
- [x] I have provided links to existing integrations in other projects
- [x] I have verified the API documentation is accessible
- [x] I understand this is an automated AI process and results may vary
- [x] I am willing to test the generated plugin and provide feedback
Thanks
Thanks for the feedback, the GitHub token had expired, I’ve added a new one!
Thanks, everything is good for the matterbridge plugin factory
I was also able to test the mode and it’s ok for me
I even have other features that have appeared
Thanks for the work
Thanks for the tests, it’s merged and will be included in the next version of Gladys!
It’s available in Gladys Assistant 4.84:
Hello everyone !
I’m really excited to release tonight a version that, I think, will really change the pace of the project’s evolution.
External integrations are finally coming to Gladys! They will allow us to enrich the list of compatible devices and services much faster, while allowing everyone to develop and share their own integrations.
I explain everything in this article