Need help fixing script (Unexpected error calling config validator: unhashable type: 'list')

Hi everybody,

below is a script I am trying to create. It is supposed the check whether a certain climate entity is above a threshold and if the corresponding door is opened. If so, it is supposed to alert a user via notify.alexa_media, then wait a set amount of minutes, and if the condition is still true, lower the temperature.

I have tried countless versions of this, always checking my configuration via webUI. Until now, it’d give me the line(s) that caused an error. Now it only states Unexpected error calling config validator: unhashable type: 'list'.

So I don’t know which part is faulty. Can you please help me fix this script?

Thank you in advance for your help :slight_smile:

script:
  heizungen_tuer:
    alias: "Heizungen Tür und Temperatur"
    sequence:
      condition:
        condition: and
        conditions:
          - condition: state
            entity_id: '{{ tuer_entity }}'
            state: 'on'
          - condition: numeric_state
            entity_id: '{{ temperatur_entity }}'
            above: '{{ temperatur_wert }}'
      action:
        - service: notify.alexa_media
          data:
            target: '{{ alexa_entity }}'
            message: 'Bitte Tür zu machen oder Heizung runter stellen. Vielen Dank.'
            type: tss
        - delay:
          hours: 0
          minutes: '{{ wartezeit }}'
          seconds: 0
          milliseconds: 0
      condition:
        - condition: and
          conditions:
            - condition: state
              entity_id: '{{ tuer_entity }}'
              state: 'on'
            - condition: numeric_state
              entity_id: '{{ temperatur_entity }}'
              above: '{{ temperatur_wert }}'
      action:
        - service: notify.alexa_media
          target: '{{ alexa_entity }}'
          message: 'Habe die Heizung auf {{ temperatur_runter }} Grad gestellt.'
          data:
            type: tss
        - service: climate.set_temperature
          entity_id: '{{ climate_entity }}'
          temperature: '{{ temperatur_runter }}'

That’s not valid syntax for a script, that’s for an automation. There’s no action in an script.

Seems like you’re intending to use the choose function without following the correct syntax. Take a look at the script docs for help. But as @Burningstone said, you’re also mixing automation syntax with script syntax.

:thinking:

1 Like

Good catch. Fixed.

:expressionless:

:wink:

1 Like