- 积分
- 341
- 金钱
- 292
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
- 积分
- 341
- 金钱
- 292
- HASS币
- 0
|
8266刷esphme接接ha测空气温湿度,想接个屏幕显示,屏幕只亮一小条 大神帮忙看看代码哪里有问题
esphome:
name: esphome-web-5915f1
friendly_name: ESPHome Web 5915f1
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: ""
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esphome-Web-5915F1"
password: ""
captive_portal:
i2c:
sda: D2
scl: D1
setup_priority: -100
font:
- file: 'slkscr-2.ttf'
id: font1
size: 10
- file: 'slkscrb-3.ttf'
id: font2
size: 10
- file: 'slkscre-4.ttf'
id: font3
size: 10
sensor:
- platform: dht
pin: D6
temperature:
name: "Living Room Temperature"
id: a12345
humidity:
name: "Living Room Humidity"
update_interval: 60s
model: DHT11
- platform: adc
#unit_of_measurement: "%"
#icon: "mdi:flower-outline"
#accuracy_decimals: 0
pin: A0
id: my_sensor
filters:
- lambda: |-
return x;
name: "Soil Sensor"
update_interval: 5s
display:
- platform: ssd1306_i2c
model: "SSD1306 128X64"
id: ssd1306
setup_priority: -100
invert: false
address: 0x3C
#external_vcc: true
offset_x: -10
lambda: |-
it.print(0, 0, id(font1), "H");
update_interval: 1s
|
|