fix: Stop the automatic upgrade from discarding valid configuration (#2692)

- Closes #2689
This commit is contained in:
Dermot Duffy
2026-08-19 17:02:46 -07:00
committed by GitHub
parent 84b90bcc7e
commit 1e03e6a3d9
7 changed files with 749 additions and 89 deletions
+14
View File
@@ -1935,6 +1935,20 @@ describe('automations should accept Home Assistant input shorthands', () => {
]);
});
it('should accept a conditions key written with no value', () => {
const result = automationsSchema.parse([
{
triggers: [{ trigger: 'initialized' }],
conditions: null,
actions: [
{ action: 'fire-dom-event', advanced_camera_card_action: 'live_substream_on' },
],
},
]);
expect(result).toMatchObject([{ conditions: [] }]);
});
it('should keep the plural key when both singular and plural are given', () => {
const result = automationsSchema.parse([
{