Skip to content

Commit

Permalink
Merge 6d82bb1 into 07aacc9
Browse files Browse the repository at this point in the history
Davek145 authored Sep 15, 2023
2 parents 07aacc9 + 6d82bb1 commit b7270d2
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions bundles/org.openhab.ui/doc/components/oh-location-card.md
Original file line number Diff line number Diff line change
@@ -100,6 +100,7 @@ A card showing model items in a certain location
<PropOption value="speakers" label="Speakers/AV Receivers Powered On" />
<PropOption value="temperature" label="Average Temperature (+ Setpoint)" />
<PropOption value="humidity" label="Average Humidity" />
<PropOption value="co2" label="Average CO2" />
<PropOption value="luminance" label="Average Luminance" />
</PropOptions>
</PropBlock>
Original file line number Diff line number Diff line change
@@ -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)
])
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
</span>
</div>
<div class="location-stats margin-top-half" v-if="!config.disableBadges">
<span v-for="badgeType in ['temperature', 'humidity', 'luminance']" :key="badgeType">
<span v-for="badgeType in ['temperature', 'humidity', 'co2', 'luminance']" :key="badgeType">
<measurement-badge v-if="!config.badges || !config.badges.length || config.badges.indexOf(badgeType) >= 0"
:store="context.store" :element="element" :type="badgeType" :invert-color="config.invertText" :badgeOverrides="badgeOverrides" />
</span>

0 comments on commit b7270d2

Please sign in to comment.