feat: Add support for template conditions (#1995)

- Closes:  #1988
This commit is contained in:
Dermot Duffy
2025-04-05 22:25:46 +01:00
committed by GitHub
parent 36783855a2
commit e7a9e20c9e
10 changed files with 184 additions and 67 deletions
@@ -9,7 +9,6 @@ import {
createHASS,
createStateEntity,
createStore,
createUser,
createView,
} from '../../test-utils';
@@ -50,17 +49,13 @@ describe('HASSManager', () => {
it('should set condition manager state', () => {
const api = createCardAPI();
const manager = new HASSManager(api);
const states = { 'switch.foo': createStateEntity() };
const user = createUser({ id: 'user_1' });
const hass = createHASS(states, user);
const hass = createHASS();
manager.setHASS(hass);
expect(api.getConditionStateManager().setState).toBeCalledWith(
expect.objectContaining({
state: states,
user: user,
hass: hass,
}),
);
});