Skip to content

Commit

Permalink
fix: revert change to ignore state_changed with prev state was null
Browse files Browse the repository at this point in the history
Fixes: #271
  • Loading branch information
zachowj committed Oct 5, 2020
1 parent 61021a8 commit 4503856
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/ha-websocket.js
Expand Up @@ -285,16 +285,6 @@ class HaWebsocket extends EventEmitter {
this.states[emitEvent.entity_id] = emitEvent.event.new_state;
}

// 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 &&
emitEvent.event.old_state === null
) {
this.emit('ha_events:all', emitEvent);
return;
}

// Emit on the event type channel
if (emitEvent.event_type) {
this.emit(`ha_events:${msg.event_type}`, emitEvent);
Expand Down

0 comments on commit 4503856

Please sign in to comment.