Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create aux badge for humidity setpoints similar to temperature badge #2154

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export default {
direct = findPoints(this.element.properties, 'Point_Setpoint', true, 'Property_Temperature')
if (direct.length) return direct
return findPoints(allEquipmentPoints(this.element.equipment), 'Point_Setpoint', true, 'Property_Temperature')
case 'humidity':
direct = findPoints(this.element.properties, 'Point_Setpoint', true, 'Property_Humidity')
if (direct.length) return direct
return findPoints(allEquipmentPoints(this.element.equipment), 'Point_Setpoint', true, 'Property_Humidity')
default:
return []
}
Expand All @@ -101,7 +105,7 @@ export default {
return (this.type === 'temperature') ? Math.round(ret * 10) / 10 : Math.round(ret)
},
reduceAux () {
if (this.type !== 'temperature') return undefined
if (this.type !== 'temperature' && this.type !== 'humidity') return undefined
const ret = this.mapAux.reduce((avg, state, arr, { length }) => {
const value = Number.parseFloat(state)
if (Number.isFinite(value)) {
Expand Down