Skip to content

Commit

Permalink
ESPHome Svitlo Bot (Shadow) v3.5.7 - Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjswan committed Jul 17, 2024
1 parent 3b75878 commit 43cc85e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions svitlobot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ script:
{
ESP_LOGD("SvitloBot", "Send status - success");
id(send_status).publish_state(true);
id(send_quality) = id(send_quality) < 0 ? 100 : std::min(100, id(send_quality)++);
id(send_quality) = id(send_quality) < 0 ? 100 : std::min(100, ++id(send_quality));
}
else
{
Expand All @@ -123,7 +123,7 @@ script:
ESP_LOGE("SvitloBot", "Send status - not success with response code: %d", code);
}
id(send_status).publish_state(false);
id(send_quality) = id(send_quality) < 0 ? 0 : std::max(0, id(send_quality)--);
id(send_quality) = id(send_quality) < 0 ? 0 : std::max(0, --id(send_quality));
}
mode: queued

Expand Down

0 comments on commit 43cc85e

Please sign in to comment.