I am trying to get an ESP32 to log weight to IFTTT (in order to forward to Fitbit then MyFitnessPal and eventually to Garmin)
As soon as I include the http_request.post in my configuration the ESP32 boot loops even if I have the call in a script which is not executed. Is this supposed to work (or is there something wrong with my config?)
esphome:
name: esp32
platform: ESP32
board: esp32dev
# Enable logging
logger:
# Enable Home Assistant API
api:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
#Enable http request for IFTTT webhooks send
http_request:
#miscale requires ble_tracker
esp32_ble_tracker:
sensor:
- platform: xiaomi_miscale
mac_address: '70:87:9E:53:F8:75'
weight:
name: "Xiaomi Mi Scale Weight"
id: weight_miscale
on_value:
then:
- lambda: |-
if (id(weight_miscale).state >= 55 && id(weight_miscale).state <= 68) {
return id(weight_user1).publish_state(x);}
- platform: template
name: Weight Brent
id: weight_user1
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
#web_server:
# port: 80
# Script to log weight to IFTTT
#script:
# - id: log_weight_ifttt
# then:
# - http_request.post:
# url: !secret iftt_url #https://maker.ifttt.com/trigger/log_weight/with/key/APIKEY
# headers:
# Content-Type: application/json
# json: |-
# root["value1"] = id(weight_user1).state;
# verify_ssl: false
The version I have above runs fine, however if I uncomment the script or add the same logic under an action on the sensor - the ESP32 boot loops