Esphome配置

yaml
  • 01
  • 02
  • 03
  • 04
  • 05
  • 06
  • 07
  • 08
  • 09
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
esphome: name: hot-water esp8266: board: esp01 # Enable logging logger: # Enable Home Assistant API api: encryption: key: "QfP78UCAKC0dab/VIWt5hleR9mNIoISMv6A7vgmVZq8=" ota: password: "35d78fc74b970fd454a16898ca0f1efe" wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Hot-Water Fallback Hotspot" password: "93gCTm1aK3JT" captive_portal: switch: - platform: gpio pin: 0 name: "hot-water-switch" id: "hot_water" binary_sensor: - platform: gpio pin: number: 2 mode: INPUT_PULLUP name: "hot-water-sensor" filters: - delayed_on_off: 300ms on_state: then: - switch.toggle: "hot_water"