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
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>webui</title> <title>webui</title>
<script type="module" crossorigin src="/assets/index-ChuD7eTF.js"></script> <script type="module" crossorigin src="/assets/index-Dk7k-sHL.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CCqAmxiE.css"> <link rel="stylesheet" crossorigin href="/assets/index-CCqAmxiE.css">
</head> </head>
<body> <body>
+4 -1
View File
@@ -37,7 +37,10 @@ export function ControlSystemProvider({ children }) {
const turnOnAllLights = useCallback(() => { const turnOnAllLights = useCallback(() => {
const entities = session?.homeAssistant?.entities || []; const entities = session?.homeAssistant?.entities || [];
const targets = entities.filter( 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) { if (targets.length === 0) {
pendingLightsRef.current = false; pendingLightsRef.current = false;