http_request:
useragent: esphome/device
id: my_request
timeout: 3s
interval:
- interval: 3s
then:
- http_request.get:
# url: "http://c3-hx711.local/sensor/hx711_data"
url: "http://c3-hxhgjghjjhgj"
on_response:
then:
- if:
condition: # 判断条件 请求状态==200表示成功
- lambda: 'return status_code == 200;'
then:
- logger.log: "请求成功"
else:
- logger.log: "请求失败"
- logger.log:
format: "Response status: %d, Duration: %u ms"
args: [status_code, duration_ms]
发现了一个奇怪的地方,我乱写了一个url: "http://c3-hxhgjghjjhgj",居然没有重启...
url: "http://c3-hx711.local/sensor/hx711_data"就会重启,,,,这是什么情况 |