diff --git a/bundles/org.openhab.ui/doc/components/oh-location-card.md b/bundles/org.openhab.ui/doc/components/oh-location-card.md index 0e3a493070..72ca005f05 100644 --- a/bundles/org.openhab.ui/doc/components/oh-location-card.md +++ b/bundles/org.openhab.ui/doc/components/oh-location-card.md @@ -100,6 +100,7 @@ A card showing model items in a certain location + diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/home/index.js b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/home/index.js index dbf160e14f..04acc23ac4 100644 --- a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/home/index.js +++ b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/home/index.js @@ -115,6 +115,7 @@ export const OhLocationCardParameters = () => new WidgetDefinition('oh-location- { value: 'speakers', label: 'Speakers/AV Receivers Powered On' }, { value: 'temperature', label: 'Average Temperature (+ Setpoint)' }, { value: 'humidity', label: 'Average Humidity' }, + { value: 'co2', label: 'Average CO2' }, { value: 'luminance', label: 'Average Luminance' } ], true, true) ]) diff --git a/bundles/org.openhab.ui/web/src/components/cards/glance/location/measurement-badge.vue b/bundles/org.openhab.ui/web/src/components/cards/glance/location/measurement-badge.vue index f9994d8386..a22b00b438 100644 --- a/bundles/org.openhab.ui/web/src/components/cards/glance/location/measurement-badge.vue +++ b/bundles/org.openhab.ui/web/src/components/cards/glance/location/measurement-badge.vue @@ -34,6 +34,7 @@ export default { badgeConfigs: { temperature: { icon: 'f7:thermometer', unit: '°' }, humidity: { icon: 'f7:drop', unit: '%' }, + co2: { icon: 'f7:wind', unit: 'ppm' }, luminance: { icon: 'f7:sun_min', unit: 'lx' } } } @@ -59,6 +60,10 @@ export default { direct = findPoints(this.element.properties, 'Point_Measurement', true, 'Property_Humidity') if (direct.length) return direct return findPoints(allEquipmentPoints(this.element.equipment), 'Point_Measurement', true, 'Property_Humidity') + case 'co2': + direct = findPoints(this.element.properties, 'Point_Measurement', true, 'Property_CO2') + if (direct.length) return direct + return findPoints(allEquipmentPoints(this.element.equipment), 'Point_Measurement', true, 'Property_CO2') case 'luminance': direct = findPoints(this.element.properties, 'Point_Measurement', true, 'Property_Light') if (direct.length) return direct diff --git a/bundles/org.openhab.ui/web/src/components/cards/location-card.vue b/bundles/org.openhab.ui/web/src/components/cards/location-card.vue index 4b060162b8..eefbc5cd2a 100644 --- a/bundles/org.openhab.ui/web/src/components/cards/location-card.vue +++ b/bundles/org.openhab.ui/web/src/components/cards/location-card.vue @@ -14,7 +14,7 @@
- +