prohand
Septembre 12, 2026, 11:06
1
Hello,
Pour info je me suis lancé dans le dev pour Electricity Maps :
Gladys external integration to see electricty maps devices in Gladys
Je vous tiens au courant quand il y a une version assez mature pour tester
Pour information l’intégration est ok mais je ne la publie pas pour le moment car il faut attendre que la PR suivante soit mis dans master sur Gladys :
master ← prohand:feat/grid-carbon-sensor-category
ouvert 12:37PM - 12 Sep 26 UTC
Integrations that publish the carbon content of the grid electricity of a zone (… Electricity Maps, a national TSO, WattTime, or a device implementing the Matter Electrical Grid Conditions cluster) have no category to map onto today, so they fall back to unknown/unknown: the features show up as "Unknown" in the device screens, with no icon, no unit and no scene-friendly meaning.
New category `grid-carbon-sensor`, with three read-only types:
- `carbon-intensity`: gCO2eq per kWh consumed in the zone, the quantity and the unit of the Matter Electrical Grid Conditions cluster (0x00A0) GridCarbonIntensity attribute;
- `carbon-free-percentage`: share of the consumed electricity coming from non-fossil sources (renewables and nuclear), in %;
- `renewable-percentage`: share coming from renewables only, in %.
New unit `gram-co2eq-per-kilowatt-hour`, restricted to the intensity type through DEVICE_FEATURE_UNITS_BY_CATEGORY_AND_TYPE so the two shares only offer the percent unit.
Plumbing: translations (en/fr/de), category icons, energy group of the activity history, MQTT catalog defaults (unit, min/max, preview value) and the room badge colors, where the intensity is colored low-as-green while the two shares are colored high-as-green.
Claude-Session: https://claude.ai/code/session_012CeYszascAZzpQG1gmdMCx
### Description
### Related request
### Checklist
- [ ] If a forum topic or GitHub issue exists, the description links it (`Forum: https://community.gladysassistant.com/t/...` or `Closes #...`)
- [ ] Tests pass: `cd server && npm run coverage` (Codecov requires 100% coverage on changed lines) and Cypress (`npm run cypress:run`) if the UI changed
- [ ] Linter and prettier pass on both front and server (`npm run eslint`, `npm run prettier`)
- [ ] No undocumented breaking change
## Summary by CodeRabbit
* **New Features**
* Added support for grid carbon sensors, including carbon intensity, carbon-free electricity, and renewable electricity metrics.
* Added gCO₂eq/kWh and percentage-based measurements.
* Added grid carbon metrics to energy history and device previews.
* Added dedicated icons and value-based coloring for carbon metrics.
* **Localization**
* Added English and German translations for the new metrics and units.
* Corrected the French label for the gCO₂eq/kWh unit.