I have a peek when the sensor turn on, I got that on my soil sensor and the battery sensor. if it’s possible, i want to skip the first read or like “turn on and read 20 seconds after”.
Any suggestion?
Thanks
esphome:
name: plant
platform: ESP8266
board: esp01_1m
on_boot:
then:
- delay: 30s
- output.turn_on: sample_pin
- delay: 170s
- output.turn_off: sample_pin
- delay: 5s
- deep_sleep.enter: Deepsleep1
output:
- platform: gpio
pin: 4
id: sample_pin
wifi:
ssid: Secret
password: Secret
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Plant Fallback Hotspot"
password: "fCMAu9YpMJtN"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
sensor:
- platform: adc
pin: 17
name: "plant_0_soil_moisture"
# attenuation: 11db
# unit_of_measurement: '%'
# filters:
# 1.1v = in water
# 2.94v = dry
# lambda: |-
# return (2.95 - x) * 100.0 / (2.95 - 1.1);
- platform: uptime
name: "Plant uptime Sensor"
- platform: adc
pin: VCC
id: "VCC"
internal: true
- platform: template
name: "plant.battery_level"
unit_of_measurement: '%'
update_interval: 60s
lambda: |-
return ((id(VCC).state /3.30) * 100.00);
binary_sensor:
- platform: gpio
pin: 4
name: "Plant Sensor"
device_class: power
deep_sleep:
id: Deepsleep1
run_duration: 200s
sleep_duration: 10min