Rest sensor with yesterday's and today's date in the payload

I’m trying to get a rest sensor working with 2 variables in the payload. yesterday and tomorrow.
if i fill in the dates manual its working, but i don’t know how to do this with templates/ or something else.
In the working config below i would like to change 2021-11-02 to [yesterday] and 2021-11-03 to [tomorrow].

- platform: rest
  name: "frank_energy_prices"
  resource: https://frank-api.nl/graphql
  method: POST
  value_template: "{{ value_json.data.marketPricesElectricity[0].priceIncludingMarkup }}"
  payload: '{"query": "query MarketPrices { marketPricesElectricity(startDate: \"2021-11-02\" endDate: \"2021-11-04\") { till from marketPrice priceIncludingMarkup } }"}'
  scan_interval: 60
  headers:
    Content-Type: application/json
  json_attributes:
    - data

The payload does not support templates.

I’m now trying to do this with the commandline sensor, but i have some issues with the variables. if i run the script direct in the console of hassos it works, but not if i start it from the commandline sensor.
the TODAY variable is working, but not the TOMORROW & YESTERDAY variables.

the Script

#!/bin/bash

TODAY=$(date +"%Y-%m-%d")
TOMORROW=$(date --date "+1 days" +"%Y-%m-%d")
YESTERDAY=$(date --date "-1 days" +"%Y-%m-%d")

curl -g \
-X POST \
-H "Content-Type: application/json" \
-d '{"query":"query MarketPrices { marketPricesElectricity(startDate: \"'"$TODAY"'\" endDate: \"'"$TOMORROW"'\") { till from marketPrice priceIncludingMarkup } }"}' \
https://frank-api.nl/graphql

and the commandline sensor code

- platform: command_line
  name: frank_commandline
  json_attributes:
    - data
  command: "bash /config/bash/frank_bash.sh"
  value_template: "{{ value_json.data.marketPricesElectricity[0].marketPrice }}"

Any ideas