用nodemcu+ hc-sr04 做了一个鱼缸水位监测的东西使用esphome复制的官方代码,接入了HA
HA里面就能显示到0.01m精度
我看设备日志里面有更精准的数字
请教大佬怎么把更精准的显示在HA里面呢?
还有这个主板需要先通电,再插上sr04才能用,都插上通电主板就不启动是咋回事呢?
esphome:
name: ygnodemcu
friendly_name: ygnodemcu
esp8266:
board: nodemcuv2
external_components:
- source:
type: local
path: /home
logger:
api:
ota:
wifi:
ssid: GG
password: 00000000
ap:
captive_portal:
light:
- platform: binary
name: "LED On NodeMCU Board"
output: my_led
output:
- platform: gpio
pin: GPIO2
id: my_led
inverted: True
# Example configuration entry
sensor:
- platform: ultrasonic
trigger_pin: GPIO3
echo_pin: GPIO1
name: "Ultrasonic Sensor"
update_interval: 2s
模块
|