Automation doesn't trigger if the trigger changed outside the time condition

Hey guys,
If got this automation set that heats the babyroom if it drops below 18 °C.
I added a condition that it’s not supposed to fire between 07:00 and 19:00, only the nights.

But now if the temperature dropped below 18 during the day, it doesn’t start heating at 19:00. Only when it changes a degree, and due to the temp-sensor that sometimes takes a while.

Any idea?

alias: Babykamer Temp onder 18 (Te Laag)
description: ""
trigger:
  - type: temperature
    platform: device
    device_id: 1cc80eb5e846d6b58697b058c93eb61a
    entity_id: sensor.babykamer_temperatuur
    domain: sensor
    below: 19
condition:
  - condition: time
    after: "19:00:00"
    before: "07:00:00"
action:
  - service: climate.set_temperature
    data:
      temperature: 23
    target:
      entity_id: climate.woonkamer
mode: single

This is a common scenario where time and a value must satisfy certain conditions in order to perform the actions.

If the temperature drops below the threshold value before 19:00:00 the Time Condition prevents the action from executing. To correct this, simply add a Time Trigger to trigger the automation at 19:00:00 and a Numeric State Condition that checks if the sensor’s value is below the threshold.

alias: Babykamer Temp onder 18 (Te Laag)
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.babykamer_temperatuur
    below: 19
  - platform: time
    at: '19:00:00'
condition:
  - condition: time
    after: '19:00:00'
    before: '07:00:00'
  - condition: numeric_state
    entity_id: sensor.babykamer_temperatuur
    below: 19
action:
  - service: climate.set_temperature
    data:
      temperature: 23
    target:
      entity_id: climate.woonkamer
mode: single

Thank you!

You’re welcome!

Please consider marking my post above with the Solution tag. For more information about how the tag is used, refer to guideline 21 in the FAQ.