Mitsubishi Climate automation based on nordpool prices

Hi!

Could somebody help me for a creating automation. What I’d like to achieve is basic automation that climate goes on, HVAC mode heat, swing mode 4 if price is below x c/kWh and if price is higher than this then climate goes off.

Nordpool prices are changed every hour.

I’ve tried this (not tested yet) but don’t know how to handle climate off:

alias: ILP testi
description: ""
trigger:
  - platform: time_pattern
    hours: /1
condition:
  - condition: numeric_state
    entity_id: sensor.nordpool_kwh_fi_eur_3_10_024
    attribute: current_price
    below: 5
action:
  - service: climate.turn_on
    data: {}
    target:
      entity_id: climate.mitsun_pumppu
  - service: climate.set_temperature
    data:
      temperature: 22
      hvac_mode: heat
    target:
      device_id: cc8d28c5d3ef6e24be8fa123e776c936
  - service: climate.set_swing_mode
    data:
      swing_mode: "4"
    target:
      entity_id: climate.mitsun_pumppu
mode: single