[ld2412] Use a user provided default constructor for BluetoothSwitch (#19189)

This commit is contained in:
J. Nick Koston
2026-09-16 18:17:17 +12:00
committed by GitHub
parent 4d648bf872
commit 794aefb276
@@ -7,7 +7,8 @@ namespace esphome::ld2412 {
class BluetoothSwitch final : public switch_::Switch, public Parented<LD2412Component> {
public:
BluetoothSwitch() = default;
// User provided, not "= default": `new(p) BluetoothSwitch()` would zero-fill .bss that is already zero.
BluetoothSwitch() {}
protected:
void write_state(bool state) override;