Heya,
I’d like to disable the LD2410 bluetooth in the ESPHome configuration, not via a switch in HA. Is that possible? I read the doc and this PR but still not sure how to achieve that.
On your esphome configuration use
on_...:
then:
- switch.turn_off: btswitch #id of your bluetooth switch
1 Like
It looks like it always restores the switch state on reboot. So if Bluetooth is on, it stays on when rebooted and if it is off, it stays off when rebooted. I tried to set the restore_mode to ‘ALWAYS_OFF’ but that didn’t seem to do anything.
You could add the following to set the switch to off for Bluetooth each time it is restarted and still give you the ability to turn it back on from HA.
esphome:
on_boot:
- priority: 10
then:
lambda: |-
id(LD2410BT).turn_off();
switch:
- platform: ld2410
bluetooth:
name: "LD2410 Control Bluetooth"
id: LD2410BT
Amazing, thank you both