Hello,
I have a very simple esphome device that I’m using to collect data from a bunch of sensors. There are about 20 sensors scattered around the yard and the configuration I have works and collects the data, but I want the device to sleep for 2 hours after operating for 20 minutes because it is battery operated. The problem is, when the ble_tracker is set to continuous scan, it prevents the device from sleeping. If I set continuous = false, it goes to sleep as expected. Is there a way to get this working? Here is my config:
esphome:
name: growbot01
friendly_name: growbot01
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "blahblah"
ota:
password: "blahblah"
wifi:
reboot_timeout: 4min
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Growbot01 Fallback Hotspot"
password: "blahblah"
captive_portal:
deep_sleep:
id: deep_sleep_1
run_duration: 20min
sleep_duration: 120min
mqtt:
broker: blah.blah.blah
port: 1883
username: mqtt
password: !secret mqtt_pw
topic_prefix: backyard/sensors
birth_message:
will_message:
#on_message:
# - topic: devices/miflora02/ota_mode
# payload: 'ON'
# then:
# - deep_sleep.prevent: deep_sleep_1
# - topic: devices/miflora02/ota_mode
# payload: 'OFF'
# then:
# - deep_sleep.enter: deep_sleep_1
esp32_ble_tracker:
id: ble_tracker
scan_parameters:
continuous: false
text_sensor:
- platform: ble_scanner
name: "BLE Devices Scanner"
sensor:
- platform: xiaomi_hhccjcy01
mac_address: 'C4:7C:8D:6B:3B:B2'
temperature:
name: "Herb Garden 1 Temperature"
force_update: true
Any suggestions are much appreciated!
Jason