ESPHome最基礎的YAML設定內容

建議設定值

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
esphome:
  name: test
  friendly_name: test

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  # encryption:
  #   key: "<your key>"

ota:
  - platform: esphome
    # password: "<your key>"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
#   ap:
#     ssid: "Test Fallback Hotspot"
#     password: "<your password>"

# captive_portal:

初始預設值(yaml)內容如下

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
esphome:
  name: test
  friendly_name: test

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "<your key>"

ota:
  - platform: esphome
    password: "<your password>"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Test Fallback Hotspot"
    password: "<your password>"

captive_portal:

基礎可用版本設定檔

  • 環境在內部任網路,可關閉 home assistant API key 以及 OTA 需要的 key
1
2
3
4
5
6
7
8
# Enable Home Assistant API
api:
  # encryption:
  #   key: "<your key>"

ota:
  - platform: esphome
    # password: "<your key>"
  • 關閉裝置開放熱點的功能
1
2
3
4
5
6
# Enable fallback hotspot (captive portal) in case wifi connection fails
#   ap:
#     ssid: "Test Fallback Hotspot"
#     password: "<your password>"

# captive_portal:

參考資料

Built with Hugo
Theme Stack designed by Jimmy