Consider blinds open when state is ON or 0 in blinds glance (#771)

Fixes #747.
Fixes #746.

Signed-off-by: Yannick Schaus <github@schaus.net>
pull/775/head
Yannick Schaus 2021-01-08 16:50:25 +01:00 committed by GitHub
parent e0cff13aed
commit d6ef512968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -171,7 +171,7 @@ export default {
case 'lights':
return this.map.filter((state) => state === 'ON' || (state.split(',').length === 3 && state.split(',')[2] !== '0') || (state.indexOf(',') < 0 && Number.parseInt(state) > 0)).length
case 'blinds':
return this.map.filter((state) => state === 'OPEN' || Number.parseInt(state) > 0).length
return this.map.filter((state) => state === 'OPEN' || state === 'ON' || Number.parseInt(state) === 0).length
default:
return this.map.filter((state) => state === 'ON' || state === 'OPEN').length
}