Skip to content

Commit

Permalink
fix: fix conditional for null old_state
Browse files Browse the repository at this point in the history
  • Loading branch information
zachowj committed Sep 26, 2020
1 parent b58753b commit ac9158e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ha-websocket.js
Expand Up @@ -288,7 +288,7 @@ class HaWebsocket extends EventEmitter {
// If old_state is null the state_changed was fired due to reloading of yaml files only send to events:all node
if (
emitEvent.event_type === 'state_changed' &&
emitEvent.event.old_state !== null
emitEvent.event.old_state === null
) {
this.emit('ha_events:all', emitEvent);
return;
Expand Down

0 comments on commit ac9158e

Please sign in to comment.