Setting the value of an input_number from the response of a service

I have a load of Aqara roller shade blinds which raise at 07:30 and lower at sunset. My kitchen gets cold in the winter, so I don’t want the blinds there to raise if the low temperature for the day is less than 5.

I use open-meteo and the response from weather.get_forecasts looks like this:

weather.home:
  forecast:
    - datetime: "2026-02-14T00:00:00+00:00"
      condition: rainy
      wind_bearing: 330
      temperature: 4.6
      templow: -0.5 <-- I want to store this
      wind_speed: 12.18
      precipitation: 0.1
    - datetime: "2026-02-15T00:00:00+00:00"
      ...

I assume that the best way to use that number in an automation condition is to store it in Input Number helper? I’ve got as far as this…

sequence:
  - action: weather.get_forecasts
    data:
      type: daily
    response_variable: forecast
  - action: number.set_value
    metadata: {}
    data:
      value: ${{ forecast."weather.home".forecast[0].templow }}
      entity_id: input_number.today_temperature_low
alias: Store daily temperature low
description: ""

But there’s an issue with the format of data/value: Message malformed: template value should be a string for dictionary value @ data['sequence'][1]['data']

How far off am I? I’m open to completely rethinking how I do this if there’s a better way. TIA!

      value: "{{ forecast['weather.home'].forecast[0].templow }}"

Instead of storing the templow value in an Input Number, you can create a Trigger-based Template Sensor like the example in the documentation for the Weather integration.

1 Like

Fantastic, thank you! Coffee on me :money_with_wings:

1 Like

Many thanks for the coffee!