mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-02 05:57:54 +00:00
Fix process entity (#2177)
This commit is contained in:
parent
f680832f78
commit
1d7f574b9b
@ -30,12 +30,11 @@ export const processConfigEntities = <T extends EntityConfig>(
|
|||||||
`Entity object at position ${index} is missing entity field.`
|
`Entity object at position ${index} is missing entity field.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
config = entityConf as T;
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Invalid entity specified at position ${index}.`);
|
throw new Error(`Invalid entity specified at position ${index}.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
config = entityConf as T;
|
|
||||||
|
|
||||||
if (!isValidEntityId(config.entity)) {
|
if (!isValidEntityId(config.entity)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Invalid entity ID at position ${index}: ${config.entity}`
|
`Invalid entity ID at position ${index}: ${config.entity}`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user