Ecobee Aux Heat Automation Trigger

Thanks Again, saved fine now as following, will test to see how it goes.

alias: Aux Off non-peak rate new
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.toronto_hydro_electric_system_limited_residential_rate
    attribute: active_peak
    to: off_peak
  - platform: state
    entity_id:
      - sensor.toronto_hydro_electric_system_limited_residential_rate
    attribute: active_peak
    to: mid_peak
  - platform: state
    entity_id:
      - climate.my_ecobee_3
    attribute: aux_heat
    to: "on"
condition: []
action:
  - if:
      - condition: numeric_state
        entity_id: sensor.toronto_temperature
        above: -5
    then:
      - if:
          - condition: template
            value_template: >
              {% set thermostat = 'climate.my_ecobee_3' %} {% set current =
              state_attr(thermostat, 'current_temperature') %} {% set target =
              state_attr(thermostat, 'temperature') %} {{ target - current > 1
              }}
        then:
          - service: climate.set_aux_heat
            data:
              aux_heat: true
            target:
              entity_id: climate.my_ecobee_3
        else:
          - service: climate.set_aux_heat
            data:
              aux_heat: false
            target:
              entity_id: climate.my_ecobee_3
      - service: notify.notify
        data:
          message: Ecobee switched from Aux heating heating to Heat Pump.
          title: Aux Heat
    else:
      - service: notify.notify
        data:
          message: >-
            Ecobee remained on Aux heating, conditions were not met to switch to
            Heat Pump.
          title: Aux Heat
mode: single