Skip to content

Commit

Permalink
fix(select): Fix validation of option
Browse files Browse the repository at this point in the history
Fixes #1145
  • Loading branch information
zachowj committed Nov 10, 2023
1 parent 0d516ff commit 68b8f2f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/nodes/select/SelectController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@ export default class SelectController extends InputOutputController<
}

#isValidValue(option: string): boolean {
const options = this.integration?.getEntityHomeAssistantConfigValue(
'options'
) as string;
const options =
this.integration?.getEntityHomeAssistantConfigValue('options');

if (!options || !Array.isArray(options)) {
return false;
}

return options.includes(option);
}
Expand Down

0 comments on commit 68b8f2f

Please sign in to comment.