Skip to content

Commit

Permalink
fix(get-entities): Check if property exists before seeing if it start…
Browse files Browse the repository at this point in the history
…s with something

Fixes #453
  • Loading branch information
zachowj committed Oct 28, 2021
1 parent 3bb743d commit 8a5be79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/BaseNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class BaseNode {
case 'lte':
return actualValue <= cValue;
case 'starts_with':
return actualValue.startsWith(cValue);
return actualValue && actualValue.startsWith(cValue);
case 'in_group': {
const ent = this.homeAssistant.getStates(cValue);
const groupEntities =
Expand Down

0 comments on commit 8a5be79

Please sign in to comment.