Need help with an automation trigger template

- alias: star_dish_washer_ when_cheapest
  trigger:
    platform: template
    value_template: >
    {% if (states("sensor.date_time_iso") + "Z") == (states("sensor.octopus_1hour_time")) %}
      true
    {% endif %}    
  action:
    - service: switch.toggle
      entity_id: switch.dish_washer    
   

Configuration invalid
CHECK CONFIGURATION

                      Error loading /config/configuration.yaml: while scanning for the next token

found character ‘%’ that cannot start any token

- alias: star_dish_washer_ when_cheapest
  trigger:
    platform: template
    value_template: >
      {{ states("sensor.date_time_iso") + "Z" == states("sensor.octopus_1hour_time") }}
  action:
    - service: switch.toggle
      entity_id: switch.dish_washer
1 Like

You sirs are a legend!!!