fix: Preserve parsers/matches on folder navigation (#2249)

- Closes #2231
This commit is contained in:
Dermot Duffy
2025-11-26 10:00:34 -08:00
committed by GitHub
parent 1f6a4ddce2
commit 993e288c14
11 changed files with 244 additions and 21 deletions
+13 -1
View File
@@ -2,7 +2,7 @@ import { ConditionState } from '../../conditions/types';
import { FolderConfig, FolderType, folderTypeSchema } from '../../config/schema/folders';
import { HomeAssistant } from '../../ha/types';
import { Endpoint } from '../../types';
import { ViewItem } from '../../view/item';
import { ViewFolder, ViewItem } from '../../view/item';
import { ViewItemCapabilities } from '../../view/types';
import { sortItems } from '../view/sort';
import { HAFoldersEngine } from './ha/engine';
@@ -21,6 +21,18 @@ export class FoldersExecutor {
);
}
public generateChildFolderQuery(
query: FolderQuery,
folder: ViewFolder,
): FolderQuery | null {
return (
this._getFolderEngine(query.folder.type)?.generateChildFolderQuery(
query,
folder,
) ?? null
);
}
public async expandFolder(
hass: HomeAssistant,
query: FolderQuery,