Turn off heating when door open for some time

I want to turn off the heating in the bathroom when the door is open for some time, I’m using an aqara door sensor. The below automation should work according to this forum but it doesn’t.
I also want the heating to be switched off when it is put on (remotely) while the door is open.

alias: Verwarming badkamer uit wanneer de deur open staat
description: ""
  - platform: state
      - binary_sensor.deur_badkamer
    attribute: "on"
      hours: 0
      minutes: 0
      seconds: 10
condition: []
  - service: climate.set_hvac_mode
    metadata: {}
      hvac_mode: "off"
      area_id: badkamer
mode: single

The only thing I see that I’m not used to is the area.
What happens if you replace that with entity of the TRV (or whatever you got there)?

Also what does the trace say?
Does it trigger? Error messages?

1 Like

@Hellis81 is spot on

      entity_id: climate.your_thermostat
1 Like