Automation for cleaning up Air Conditioner

Hello,
I have a few Daikin Air Conditioners which have great integration in Home Assistant, but they have missing build in feature for drying the indoor unti after switching off the air conditioner. As you know, when you are in cooling mode and turn off the device, water condenses on the indoor unit. This creates an unpleasant odor over time. Some of the manufacturers have an option for cleaning up. This feature is triggered only when you turn the mode from cool to off. Then the air conditioner do not power off immediately instead of switching to fan only for 20 to 30 min. I’m trying to create the same automation but without success. Could somebody help me on that topic.
Here is my configuration:

alias: Daikin35-clean
description: ""
trigger:
  - platform: state
    entity_id:
      - climate.living_room_daikin
    attribute: hvac_modes
    to: "off"
condition:
  - condition: device
    device_id: 636a9de4d802d2566e76d57788244c1c
    domain: climate
    entity_id: climate.living_room_daikin
    type: is_hvac_mode
    hvac_mode: cool
action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - type: turn_on
    device_id: 636a9de4d802d2566e76d57788244c1c
    entity_id: switch.living_room_daikin_streamer
    domain: switch
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - device_id: 636a9de4d802d2566e76d57788244c1c
    domain: climate
    entity_id: climate.living_room_daikin
    type: set_hvac_mode
    hvac_mode: fan_only
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - type: turn_off
    device_id: 636a9de4d802d2566e76d57788244c1c
    entity_id: switch.living_room_daikin_streamer
    domain: switch
mode: single

Ok then. For a start you need to change your trigger to reflect that requirement by including from:. Also the attribute hvac_modes is only a list of possible modes. You want he state of the climate device, so delete that attribute:

trigger:
  - platform: state
    entity_id:
      - climate.living_room_daikin
    from: "cool"
    to: "off"

If the air conditioner state is now off this condition will never pass, delete it (and it is now taken care of by the updated trigger anyway):

condition:
  - condition: device
    device_id: 636a9de4d802d2566e76d57788244c1c
    domain: climate
    entity_id: climate.living_room_daikin
    type: is_hvac_mode
    hvac_mode: cool

I don’t know what the streamer is so I’ll leave that in but in your actions you only have fan mode on for 30 seconds and you said:

So change the third delay to 30 minutes:

action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - type: turn_on
    device_id: 636a9de4d802d2566e76d57788244c1c
    entity_id: switch.living_room_daikin_streamer
    domain: switch
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - device_id: 636a9de4d802d2566e76d57788244c1c
    domain: climate
    entity_id: climate.living_room_daikin
    type: set_hvac_mode
    hvac_mode: fan_only
  - delay:
      hours: 0
      minutes: 30
      seconds: 0
      milliseconds: 0
  - type: turn_off
    device_id: 636a9de4d802d2566e76d57788244c1c
    entity_id: switch.living_room_daikin_streamer
    domain: switch
mode: single
1 Like

Hi Tom,
thanks for your message.
The trigger which you advice was my first try, but unfortunately without success.
Regarding the streamer, I don’t know why Daikin integration is creating 1 climate and 1 streamer entries, but turning on/off over the climate or streamer is doing the same.
I’ve already test with just clicking run actions, and expected actions are performed.
I just not able to trigger the automation. Regarding the seconds at the action panel, they are just 30 because I’m still testing.

With your advices the current code is:

alias: Daikin35-clean
description: ""
trigger:
  - platform: state
    entity_id:
      - climate.living_room_daikin
    attribute: hvac_modes
    from: cool
    to: "off"
action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - device_id: 636a9de4d802d2566e76d57788244c1c
    domain: climate
    entity_id: climate.living_room_daikin
    type: set_hvac_mode
    hvac_mode: fan_only
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - device_id: 636a9de4d802d2566e76d57788244c1c
    domain: climate
    entity_id: climate.living_room_daikin
    type: set_hvac_mode
    hvac_mode: "off"
mode: single

You are not able to trigger because you are still checking the state of this attribute:

attribute: hvac_modes

That is only a list of available modes. It does not change. Remove it from the trigger config so that Home Assistant checks the state of the climate device instead. The state of climate.living_room_daikin is what changes from cool to off. Not it’s list of available modes. See what I wrote before?

No attribute: hvac_modes in there.

1 Like

Thank you very much Tom!
It’s my fault, now is working, I’ve miss you first time. Sorry for that.
Have a nice evening!

1 Like

Here’s my yaml for my Daikin coil dry automation, builtin using the GUI.

  • It covers if the unit was in cooling mode or drying mode and then is switched off.
  • It also sets the fan to the lowest fan speed “Silence” and turns on the “streamer function”
alias: ac Boys Bdrm coil dry
description: Dry the coil after Cooling or Drying mode
trigger:
  - platform: state
    entity_id:
      - climate.ac_boys_bdrm
    attribute: hvac_action
    from: cooling
    to: "off"
  - platform: state
    entity_id:
      - climate.ac_boys_bdrm
    attribute: hvac_action
    from: drying
    to: "off"
condition: []
action:
  - service: climate.set_hvac_mode
    metadata: {}
    data:
      hvac_mode: fan_only
    target:
      device_id: 4b5b03bf660fddc108063600b4bc2fdc
  - service: climate.set_fan_mode
    metadata: {}
    data:
      fan_mode: Silence
    target:
      device_id: 4b5b03bf660fddc108063600b4bc2fdc
  - type: turn_on
    device_id: 4b5b03bf660fddc108063600b4bc2fdc
    entity_id: 47d1befcad86d4d6194e5720ace1dee1
    domain: switch
  - delay:
      hours: 1
      minutes: 0
      seconds: 0
      milliseconds: 0
  - service: climate.turn_off
    metadata: {}
    data: {}
    target:
      device_id: 4b5b03bf660fddc108063600b4bc2fdc
mode: single

I need to update this.

I found using the hvac_action had a very unwanted effect, if the a/c unit was in cool mode but wasn’t actually doing much, then the hvac_action was “idle” and this wrecked by automation because if you happened to turn the a/c off whilst it wasn’t working due to at temperature then the coil dry never happened.

After much playing around and testing, by simply taking the climate.ac.boys.bdrm state, I get cool or heat or off, etc and never idle and so now this automation really does work!

alias: ac Boys Bdrm coil dry
description: Dry the coil after Cooling or Drying mode
trigger:
  - platform: state
    entity_id:
      - climate.ac_boys_bdrm
    from: cool
    to: "off"
  - platform: state
    entity_id:
      - climate.ac_boys_bdrm
    from: dry
    to: "off"
condition: []
action:
  - service: climate.turn_on
    metadata: {}
    data: {}
    target:
      device_id: 4b5b03bf660fddc108063600b4bc2fdc
  - service: climate.set_hvac_mode
    metadata: {}
    data:
      hvac_mode: fan_only
    target:
      device_id: 4b5b03bf660fddc108063600b4bc2fdc
  - service: climate.set_fan_mode
    metadata: {}
    data:
      fan_mode: Silence
    target:
      device_id: 4b5b03bf660fddc108063600b4bc2fdc
  - type: turn_on
    device_id: 4b5b03bf660fddc108063600b4bc2fdc
    entity_id: 47d1befcad86d4d6194e5720ace1dee1
    domain: switch
  - delay:
      hours: 1
      minutes: 0
      seconds: 0
      milliseconds: 0
  - service: climate.turn_off
    metadata: {}
    data: {}
    target:
      device_id: 4b5b03bf660fddc108063600b4bc2fdc
mode: single