( roleez | 2023. 12. 12., k – 12:13 )

Szerkesztve: 2023. 12. 12., k – 12:18

Átírtam ESPHome alá.
A Google Sheet-be nem tudok beleírni, böngészőből ez a link megy.

ESPHome termináljában ezt kapom:
[D][main:084]: Response status: -5
[W][http_request:081]: HTTP Request failed; URL: https://script.google.com/macros/s/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/exec?…; Error: connection lost

Az ESPHome yaml rész:
Interval:
  - interval: 60s
    then:
    - http_request.get:
        url: !lambda |-
           char buf[200];
           sprintf(buf, "https://script.google.com/macros/s/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/exec?…", rand()%100, rand()%200);
           return ((std::string) buf).c_str();
        headers:
          Content-Type: application/json
        verify_ssl: true
        on_response:
          then:
            - logger.log:
                format: 'Response status: %d'
                args:
                  - status_code
Mit bökök el?