mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
wuh
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user