mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-15 07:25:54 +00:00
computeGroupEntitiesState(): fix condition (#29234)
* fix condition * fix condition * prettier
This commit is contained in:
@@ -8,7 +8,9 @@ export const computeGroupEntitiesState = (states: HassEntity[]): string => {
|
||||
return UNAVAILABLE;
|
||||
}
|
||||
|
||||
const validState = states.filter((stateObj) => isUnavailableState(stateObj));
|
||||
const validState = states.some(
|
||||
(stateObj) => !isUnavailableState(stateObj.state)
|
||||
);
|
||||
|
||||
if (!validState) {
|
||||
return UNAVAILABLE;
|
||||
|
||||
Reference in New Issue
Block a user