API responds 400 with oh-input-card

I’ve got this page:

config:
  icon: water
  label: Irrigatie
  order: "7"
  sidebar: true
blocks:
  - component: oh-block
    config:
      title: Sproeiers
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config: {}
                slots:
                  default:
                    - component: f7-row
                      config:
                        style:
                          align-items: stretch
                        stylesheet: |
                          .card {
                            flex: 1 1 0px;
                          }
                      slots:
                        default:
                          - component: oh-toggle-card
                            config:
                              item: Kranen_irrigatie_Power_1
                              title: Sproeierschakelaar
                          - component: oh-label-card
                            config:
                              item: Kranen_irrigatie_AutoOFF_Timer_1
                              title: Ingestelde sproeitijd
                              visible: =items.Kranen_irrigatie_Power_1.state === 'OFF'
                          - component: oh-input-card
                            config:
                              item: Kranen_irrigatie_AutoOFF_Timer_1
                              sendButton: true
                              title: Nieuwe sproeitijd (in seconden)
                              type: number
                              useDisplayState: true
                              visible: =items.Kranen_irrigatie_Power_1.state === 'OFF'
                          - component: oh-label-card
                            config:
                              item: Kranen_irrigatie_AutoOFF_Timer_Remaining_1
                              title: Resterende sproeitijd
                              visible: =items.Kranen_irrigatie_Power_1.state === 'ON'
  - component: oh-block
    config:
      title: Druppelslang
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config: {}
                slots:
                  default:
                    - component: f7-row
                      config:
                        style:
                          align-items: stretch
                        stylesheet: |
                          .card {
                            flex: 1 1 0px;
                          }
                      slots:
                        default:
                          - component: oh-toggle-card
                            config:
                              item: Kranen_irrigatie_Power_2
                              title: Druppelslangschakelaar
                          - component: oh-label-card
                            config:
                              item: Kranen_irrigatie_AutoOFF_Timer_2
                              title: Ingestelde druppeltijd
                              visible: =items.Kranen_irrigatie_Power_2.state === 'OFF'
                          - component: oh-input-card
                            config:
                              item: Kranen_irrigatie_AutoOFF_Timer_2
                              sendButton: true
                              title: Nieuwe druppeltijd (in seconden)
                              type: number
                              useDisplayState: true
                              visible: =items.Kranen_irrigatie_Power_2.state === 'OFF'
                          - component: oh-label-card
                            config:
                              item: Kranen_irrigatie_AutoOFF_Timer_Remaining_2
                              title: Resterende druppeltijd
                              visible: =items.Kranen_irrigatie_Power_2.state === 'ON'
masonry: []
grid: []
canvas: []

I tried updating Kranen_irrigatie_Power_2 via the oh-input-card, but:
image

Nothing is logged in the openHAB log, but that doesn’t seem all too illogical, because this is logged in Chrome’s log:

index-Buyt_kkZ.js:5219  POST http://192.168.1.9:8080/rest/items/Kranen_irrigatie_AutoOFF_Timer_2 400 (Bad Request)
(anonymous) @ index-Buyt_kkZ.js:5219
pu @ index-Buyt_kkZ.js:5041
postPlain @ index-Buyt_kkZ.js:22815
m2 @ index-Buyt_kkZ.js:23971
i3 @ index-Buyt_kkZ.js:22519
sendButtonClicked @ index-Buyt_kkZ.js:43674
(anonymous) @ index-Buyt_kkZ.js:3303
Nn @ index-Buyt_kkZ.js:1028
Pn @ index-Buyt_kkZ.js:1035
n2 @ index-Buyt_kkZ.js:3134
irrigatie:1 Uncaught (in promise) Bad Request
XMLHttpRequest.send
(anonymous) @ index-Buyt_kkZ.js:5219
pu @ index-Buyt_kkZ.js:5041
postPlain @ index-Buyt_kkZ.js:22815
m2 @ index-Buyt_kkZ.js:23971
i3 @ index-Buyt_kkZ.js:22519
sendButtonClicked @ index-Buyt_kkZ.js:43674
(anonymous) @ index-Buyt_kkZ.js:3303
Nn @ index-Buyt_kkZ.js:1028
Pn @ index-Buyt_kkZ.js:1035
n2 @ index-Buyt_kkZ.js:3134

If I copy the HTTP request “as cURL (bash)”, this is the output:

curl 'http://192.168.1.9:8080/rest/items/Kranen_irrigatie_AutoOFF_Timer_2' \
  -H 'Accept: */*' \
  -H 'Accept-Language: nl,en-US;q=0.9,en;q=0.8,de;q=0.7' \
  -H 'Authorization: Bearer [redacted]' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: text/plain' \
  -b 'X-OPENHAB-SESSIONID=[redacted, although that's probably not necessary]' \
  -H 'Origin: http://192.168.1.9:8080' \
  -H 'Referer: http://192.168.1.9:8080/page/irrigatie' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36' \
  -H 'X-OpenHAB-Source: org.openhab.ui' \
  -H 'X-Requested-With: XMLHttpRequest' \
  --data-raw $'60 30\'00"' \
  --insecure

I’ve also made a GitHub issue for this: API responds `400` with `oh-input-card` · Issue #4027 · openhab/openhab-webui · GitHub.

Have you carefully verified the accuracy of the item name? This often comes up if the UI is trying to make an API call about an Item which doesn’t exist.

Yep. It’s correct.

Apparently, the state of the item is ‘sucked into’ the payload: API responds `400` with `oh-input-card` · Issue #4027 · openhab/openhab-webui · GitHub