Created
September 29, 2021 12:22
-
-
Save CJ-Davies/da97a299bcd0b4ed6843ea0c316ed6bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: kitchen_shtc3 | |
platform: ESP8266 | |
board: d1_mini | |
wifi: | |
ssid: "*******" | |
password: "*******" | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "*******" | |
password: "*******" | |
captive_portal: | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
ota: | |
i2c: | |
sda: D2 | |
scl: D1 | |
scan: True | |
id: bus_a | |
sensor: | |
- platform: shtcx | |
temperature: | |
name: "Kitchen Temperature" | |
humidity: | |
name: "Kitchen Humidity" | |
address: 0x70 | |
update_interval: 1000s | |
# startup takes ~8 seconds, *then* run_duration starts | |
deep_sleep: | |
run_duration: 5s | |
sleep_duration: 112s | |
id: deep_sleep_1 | |
mqtt: | |
broker: ***.***.***.*** | |
username: ******* | |
password: ******* | |
on_message: | |
- topic: ota_mode | |
payload: 'ON' | |
then: | |
- deep_sleep.prevent: deep_sleep_1 | |
- topic: ota_mode | |
payload: 'OFF' | |
then: | |
- deep_sleep.enter: deep_sleep_1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment