Skip to content

Commit

Permalink
fix(mustache-context): Fix for using both states/entity for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
zachowj committed May 4, 2019
1 parent beb556a commit 4b09811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mustache-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ NodeContext.prototype.lookup = function(name) {

// try state entities
// version 0.10.3 changed from states.domain.entity to entity.d.e
const match = /^[states|entity]\.(\w+\.\w+)(?:\.(.+))?/.exec(name);
const match = /^(?:states|entity)\.(\w+\.\w+)(?:\.(.+))?/.exec(name);
if (match) {
const gHomeAssistant = this.nodeContext.global.get('homeassistant');
const states = gHomeAssistant[this.serverName].states;
Expand Down

0 comments on commit 4b09811

Please sign in to comment.