mirror of
https://github.com/DigiLive/mushroom-strategy.git
synced 2025-08-03 19:44:27 +02:00
Fix count of active vacuums
Vacuums with state `off` where counted while that isn't a valid state. Vacuums with state `cleaning` or `returning` are now counted instead.
This commit is contained in:
@@ -87,11 +87,11 @@ abstract class AbstractView {
|
||||
|
||||
// Vertically stack the cards of the current area.
|
||||
if (areaCards.length) {
|
||||
// Create and insert a Header card.
|
||||
const areaHeaderCardOptions = (
|
||||
'headerCardConfiguration' in this.baseConfiguration ? this.baseConfiguration.headerCardConfiguration : {}
|
||||
) as CustomHeaderCardConfig;
|
||||
|
||||
// Create and insert a Header card.
|
||||
areaCards.unshift(new HeaderCard(target, { title: area.name, ...areaHeaderCardOptions }).createCard());
|
||||
|
||||
viewCards.push({ type: 'vertical-stack', cards: areaCards });
|
||||
|
@@ -36,7 +36,7 @@ class VacuumView extends AbstractView {
|
||||
return {
|
||||
title: localize('vacuum.all_vacuums'),
|
||||
subtitle:
|
||||
`${Registry.getCountTemplate(VacuumView.domain, 'ne', 'off')} ${localize('vacuum.vacuums')} ` +
|
||||
`${Registry.getCountTemplate(VacuumView.domain, 'in', '[cleaning, returning]')} ${localize('vacuum.vacuums')} ` +
|
||||
localize('generic.busy'),
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user