Skip to content

Commit

Permalink
Fixed debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
smirko-dev committed Dec 1, 2021
1 parent 4c5cf70 commit 8a12bd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions companion/index.js
Original file line number Diff line number Diff line change
@@ -136,19 +136,19 @@ function changeEntity(url, token, entity, state) {
})
.then(async(response) => {
let data = await response.json();
//DEBUG console.log('RECEIVED ' + JSON.stringify(data));
if (Force) {
let msgData = {
key: "change",
id: entity,
state: state === 'turn_on' ? 'on' : 'off'
};
if (!entity.startsWith("script") && !entity.startsWith("automation")) {
//DEBUG console.log('FORCE ' + JSON.stringify(msgData));
//DEBUG console.log('FORCED ' + JSON.stringify(msgData));
sendData(msgData);
}
}
else if (!isEmpty(data)) {
//DEBUG console.log('RECEIVED ' + JSON.stringify(data));
data.forEach(element => {
if (element["entity_id"] === entity) {
let msgData = {

0 comments on commit 8a12bd0

Please sign in to comment.