Skip to content

Commit

Permalink
Fix empty string test
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardtfn committed Nov 21, 2024
1 parent 8229245 commit 007ae6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esphome/nspanel_esphome_core_hw_buzzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ number:
buzzer->set_gain((100-(x/10.0f))/100.0f);
std::string tone_volume_change = "${tone_volume_change}";
// Play sound if tone_volume_change is not "none"
if (x > 0 and !tone_volume_change.empty and tone_volume_change != "none")
if (x > 0 and !tone_volume_change.empty() and tone_volume_change != "none")
buzzer->play(tone_volume_change);
buzzer->dump_config();
Expand Down

0 comments on commit 007ae6a

Please sign in to comment.