Skip to content

Instantly share code, notes, and snippets.

@dudiq

dudiq/aht10.yaml Secret

Created January 13, 2024 17:25
Show Gist options
  • Save dudiq/07853d504a1bf6eae5e32ff938ace816 to your computer and use it in GitHub Desktop.
Save dudiq/07853d504a1bf6eae5e32ff938ace816 to your computer and use it in GitHub Desktop.
esphome config example
- platform: aht10
id: ahtx
i2c_id: bus_a
temperature:
name: ${device_name} temperature
accuracy_decimals: 1
humidity:
name: ${device_name} humidity
accuracy_decimals: 1
update_interval: 10s
esphome:
name: $device_name
# name_add_mac_suffix
esp8266:
board: d1_mini
framework:
version: 2.7.4
# Enable logging
logger:
logs:
sensor: INFO
# Enable Home Assistant API
# api:
# password: !secret ota_pwd
ota:
password: !secret ota_pwd
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_pwd
# fast_connect: True
# Example configuration entry
mqtt:
broker: !secret mqtt_broker_ip
username: !secret mqtt_username
password: !secret mqtt_password
topic_prefix: home-assistant/$device_name
captive_portal:
i2c:
sda: D2
scl: D1
scan: true
id: bus_a
substitutions:
# Modify variables based on your settings
device_name: "bathroom"
<<: !include ./basic.yaml
binary_sensor:
- <<: !include ./pir.yaml
sensor:
- <<: !include ./aht10.yaml
- <<: !include ./waterleak.yaml
- platform: dallas
id: water_temp
index: 0
name: ${device_name} water temperature
- platform: gpio
id: pir_motion
pin: D6
name: ${device_name} pir motion
device_class: motion
- platform: adc
id: waterleak
pin: A0
name: ${device_name} waterleak
update_interval: 2s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment