本帖最后由 zy302688381 于 2024-9-11 21:36 编辑
开机串口就一直提示这个
代码如下:
esphome:
name: bl0910-4
friendly_name: BL0910-4
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "O3B+BfSUEuATbwM7sl4IEs59N0J4nvkeAsAaF2malVQ="
ota:
- platform: esphome
password: "1c8f415f3a9af2b720db3578b951f478"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Bl0910-4 Fallback Hotspot"
password: "UmkuBY1HlTLM"
captive_portal:
external_components:
- source: BL0910
uart:
tx_pin: GPIO1
rx_pin: GPIO3
baud_rate: 19200
id: utt2
sensor:
- platform: BL0910
update_interval: 1s ##传给HA状态间隔
Frequency:
name: 'Frequency'
Temperature:
name: 'Temperature'
Voltage:
name: 'Voltage'
Current_1:
name: 'Current_1'
Current_2:
name: 'Current_2'
Current_3:
name: 'Current_3'
Current_4:
name: 'Current_4'
Current_5:
name: 'Current_5'
Current_6:
name: 'Current_6'
Current_7:
name: 'Current_7'
Current_8:
name: 'Current_8'
Current_9:
name: 'Current_9'
Current_10:
name: 'Current_10'
Power_1:
name: 'Power_1'
Power_2:
name: 'Power_2'
Power_3:
name: 'Power_3'
Power_4:
name: 'Power_4'
Power_5:
name: 'Power_5'
Power_6:
name: 'Power_6'
Power_7:
name: 'Power_7'
Power_8:
name: 'Power_8'
Power_9:
name: 'Power_9'
Power_10:
name: 'Power_10'
Power_sum:
name: 'Power_sum'
Energy_1:
name: 'Energy_1'
Energy_2:
name: 'Energy_2'
Energy_3:
name: 'Energy_3'
Energy_4:
name: 'Energy_4'
Energy_5:
name: 'Energy_5'
Energy_6:
name: 'Energy_6'
Energy_7:
name: 'Energy_7'
Energy_8:
name: 'Energy_8'
Energy_9:
name: 'Energy_9'
Energy_10:
name: 'Energy_10'
Energy_sum:
name: 'Energy_sum'
|