[Automations] HVAC mode change does not always trigger automation

Hi!

Core: 2024.1.3
Frontend: 20240104.0

I have the following Automation:

alias: AB ZK an
description: ""
trigger:
  - platform: device
    device_id: b0438cfcd65435b28b330547750d9344
    domain: climate
    entity_id: 930f837fab7f6c766a2c0ed7e4d12ded
    type: hvac_mode_changed
    to: heat
condition: []
action:
  - type: turn_on
    device_id: 4acc38b13efae61fd43705840f44bfbe
    entity_id: 4de25229a4764e1b839a364d9aeac46f
    domain: switch
mode: single

And this is not always being triggered although the mode has changed and that change was also logged!

This happens some times but is not predictable.

Automation traces:
grafik

HVAC-Mode log which is missing from automation:
grafik
(hvac_mode changed to heat).

So, hvac_mode changed 100% and HA logged it but the automation does not trigger reliably.

Maybe a bug? Config issue?

I wanted to extract the raw log entry but got no option for it from inside the Frontend :confused:

Thanks in advance!

It is recommended to use state as the trigger instead of device.

In HA Visual Automation Editor. Select Add Triger, Then Entity, Then State. After Select state, go to Entity and select your Themor stat, then select how you want it triggered, i.e. to heat

1 Like

Oh, okay. Did not know that.

I updated trigger to:

trigger:
  - platform: state
    entity_id:
      - climate.afterburner_garage
    attribute: hvac_action
    to: heating

and test that.

Thanks so far!