|
| 1 | +# https://esphome.io/guides/configuration-types#substitutions |
| 2 | + |
| 3 | +esphome: |
| 4 | + name: humidity |
| 5 | + project: |
| 6 | + name: ringerc.humidity |
| 7 | + version: "1.0.0" |
| 8 | + |
| 9 | +rp2040: |
| 10 | + board: rpipicow |
| 11 | + framework: |
| 12 | + platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git |
| 13 | + |
| 14 | +i2c: |
| 15 | + |
| 16 | +sensor: |
| 17 | + - platform: bme280 |
| 18 | + temperature: |
| 19 | + name: "BME280 Temperature" |
| 20 | + oversampling: 16x |
| 21 | + pressure: |
| 22 | + name: "BME280 Pressure" |
| 23 | + humidity: |
| 24 | + name: "BME280 Humidity" |
| 25 | + # could be 0x76 |
| 26 | + address: 0x76 |
| 27 | + update_interval: 60s |
| 28 | + |
| 29 | + # rpi pico GPIO29 reads VSYS/3 |
| 30 | + - platform: adc |
| 31 | + # The voltage is read from GPIO29 |
| 32 | + # https://esphome.io/api/adc__sensor_8cpp_source.html |
| 33 | + # guards conflicts between it and the wifi by looking for PICO_VSYS_PIN (defined as 29) |
| 34 | + # https://github.com/raspberrypi/pico-sdk/blob/6a7db34ff63345a7badec79ebea3aaef1712f374/src/boards/include/boards/pico.h#L92 |
| 35 | + pin: 29 |
| 36 | + name: "VSYS" |
| 37 | + update_interval: 60s |
| 38 | + |
| 39 | +#status_led: |
| 40 | +# pin: GPIO25 |
| 41 | + |
| 42 | +deep_sleep: |
| 43 | + run_duration: 1min |
| 44 | + sleep_duration: 1min |
| 45 | + |
| 46 | +binary_sensor: |
| 47 | + - platform: status |
| 48 | + name: "Humidity status" |
| 49 | + |
| 50 | +# switch to this once home assistant installed |
| 51 | +#time: |
| 52 | +# - platform: homeassistant |
| 53 | +# id: homeassistant_time |
| 54 | + |
| 55 | +time: |
| 56 | + - platform: sntp |
| 57 | + id: sntp_time |
| 58 | + timezone: Pacific/Auckland |
| 59 | + |
| 60 | +# apparently not yet ported to pi pico? |
| 61 | +#mqtt: |
| 62 | +# broker: raspberrypi.fritz.box |
| 63 | +# username: esphome_humidity |
| 64 | +# password: !secret mqtt_password |
| 65 | +# reboot_timeout: 0s |
| 66 | + |
| 67 | +# rpi pico GPIO24 senses VBUS (high if VBUS present) |
| 68 | +# rpi pico GPIO23 OP Controls the on-board SMPS Power Save pin - pull high to disable |
| 69 | +# TODO should use "SLEEP" mode |
| 70 | + |
| 71 | +# Enable logging |
| 72 | +# https://esphome.io/components/logger#log-levels |
| 73 | +logger: |
| 74 | + level: DEBUG |
| 75 | + |
| 76 | +# Enable Home Assistant API |
| 77 | +api: |
| 78 | + encryption: |
| 79 | + key: !secret homeassistant_encryption |
| 80 | + reboot_timeout: 0s |
| 81 | + |
| 82 | +ota: |
| 83 | + password: !secret ota_password |
| 84 | + |
| 85 | +wifi: |
| 86 | + ssid: !secret wifi_ssid |
| 87 | + password: !secret wifi_password |
| 88 | + |
| 89 | +#captive_portal: |
| 90 | + |
| 91 | +preferences: |
| 92 | + flash_write_interval: 5min |
0 commit comments