feat: Add richer card theme support (#1809)

This commit is contained in:
Dermot Duffy
2025-01-07 19:54:13 -08:00
committed by GitHub
parent f7ecb91578
commit 278560b5ac
65 changed files with 1187 additions and 352 deletions
+27
View File
@@ -3406,4 +3406,31 @@ describe('should handle version specific upgrades', () => {
postUpgradeChecks(config);
});
});
describe('v6.1.2+', () => {
describe('view.dark_mode -> view.dim', () => {
it.each([
['on' as const, true],
['auto' as const, false],
['off' as const, false],
])('%s', (darkMode: 'on' | 'off' | 'auto', expected: boolean) => {
const config = {
type: 'custom:frigate-card',
cameras: [{ camera_entity: 'camera.office' }],
view: {
dark_mode: darkMode,
},
};
expect(upgradeConfig(config)).toBeTruthy();
expect(config).toEqual({
type: 'custom:frigate-card',
cameras: [{ camera_entity: 'camera.office' }],
view: {
dim: expected,
},
});
postUpgradeChecks(config);
});
});
});
});