Skip to content

Commit

Permalink
Fix bug and remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
pgorod authored Jun 20, 2023
1 parent d241f26 commit 4729850
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions powertodoist-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ class PowerTodoistCard extends LitElement {
if (!window.confirm(confirm))
return [ [] , "", "" ];
}
if (allow && !allow.includes(this.hass.user.name)) {
if (allow.length && !allow.includes(this.hass.user.name)) {
return [ [] , "", "" ];
}

Expand Down Expand Up @@ -637,7 +637,8 @@ class PowerTodoistCard extends LitElement {
let commands = [], automation = [];
let toast = "";
[commands, automation, toast] = this.buildCommands(item, "actions_" + action);
this.showToast(toast ? toast : action, 3000);
//this.showToast(toast ? toast : action, 3000);
this.showToast(toast, 3000);

this.hass.callService('rest_command', 'todoist', {
url: 'sync',
Expand Down

0 comments on commit 4729850

Please sign in to comment.