This commit is contained in:
legop3
2025-11-22 04:03:47 -05:00
parent 84905544a3
commit d222f022aa
3 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -37,7 +37,10 @@ export function ControlSystemProvider({ children }) {
const turnOnAllLights = useCallback(() => {
const entities = session?.homeAssistant?.entities || [];
const targets = entities.filter(
(ent) => ent.type === 'light' && ent.available !== false && ent.state !== 'on',
(ent) =>
(ent.type === 'light' || ent.type === 'switch') &&
ent.available !== false &&
ent.state !== 'on',
);
if (targets.length === 0) {
pendingLightsRef.current = false;