Turn on/off humidifier when hvac turned on/off automation not triggered

i’m trying to turn on the humidifier when the hvac is turned on. unfortunately it does not seem to work. like the status is just not triggered. at least that’s what the logbook tells us.
the state case does not seem to affect the working. i’ve tried both Off and off, Heat and heat
the automationconfig:

 id: '1605568411108'
  alias: Turn on humidifier when heating is on
  description: ''
  trigger:
  - platform: state
    entity_id: climate.zolder
    attribute: hvac_modes
    from: 'off'
    to: Heat
  condition: []
  action:
  - type: turn_on
    device_id: 9d7d4198c67b14d0e49b353131c66e15
    entity_id: switch.topic_prefix_5
    domain: switch
  mode: single
- id: '1605568892359'
  alias: Turn off humidifier when heating is off
  description: ''
  trigger:
  - platform: state
    entity_id: climate.zolder
    attribute: hvac_modes
    from: Heat
    to: 'Off'

Check your states against the entities in Dev->States. You have some mixed case in there and some of them must be incorrect (‘off’ vs. ‘Off’, ‘Heat’). The case of the states must match what’s in Dev->States.

the states should be correct. i’ve tried all cases, caps and no caps
hvac_modes: fan_only, dry, cool, heat, heat_cool, off

Ok. The automation that you posted has several case aberrations, so it definitely won’t work as-is. You can test the automations in Dev->States by manually changing the state and seeing if the automation triggers, and you can test the action: part by hitting the play/execute button in Configuration->Automations. Also check that the automations are enabled.

i’ve tried lowecase too, but those automations won’t be triggered.
Tried manually changing states too. nothing. The actions are good though.

I’d suspect hvac_modes is not the right choice as trigger.


- id: '1605568411108'
  alias: Turn on humidifier when heating is on
  description: ''
  trigger:
  - platform: state
    entity_id: climate.zolder
    attribute: hvac_modes
    from: off
    to: heat
  condition: []
  action:
  - type: turn_on
    device_id: 7be42839dd3666649fdc8ad0b4fde049
    entity_id: switch.tasmota_7
    domain: switch
  mode: single
- id: '1605568892359'
  alias: Turn off humidifier when heating is off
  description: ''
  trigger:
  - platform: state
    entity_id: climate.zolder
    attribute: hvac_modes
    from: heat
    to: off
  condition: []
  action:
  - type: turn_off
    device_id: 9d7d4198c67b14d0e49b353131c66e15
    entity_id: switch.topic_prefix_5
    domain: switch
  - type: turn_off
    device_id: 7be42839dd3666649fdc8ad0b4fde049
    entity_id: switch.tasmota_7
    domain: switch