Frost possible automation not working

I put together an automation to detect if my car is frosted in the morning. This would warn me if I need to leave early to have more time to scrape all my windows. The idea is simple, if the temperature drops below 33F for a minimum of 1 hour between the hours of 8pm and 8am. Yesterday the temperature dropped low enough. The historical data seems to support that but the automation did not trigger. I have a feeling that I somehow bungled the configuration. This was configured in the visual editor. I grabbed the code from automations.yaml for clarity.

- id: '1646589785344'
  alias: Frost Possible
  description: ''
  trigger:
  - platform: numeric_state
    entity_id: sensor.acurite_5n1_a_3298_t
    for:
      hours: 1
      minutes: 0
      seconds: 0
    below: '33'
  condition:
  - condition: time
    before: 08:00:00
    weekday:
    - sun
    - sat
    - fri
    - thu
    - wed
    - tue
    - mon
    after: '20:00:00'
  action:
  - service: script.push_notification_all_devices
    data:
      title: '"Frost possible"'
      message: '"Humidity {{ states(''sensor.acurite_5n1_a_3298_h'') | round(0) }}%"'
  mode: single

You should be aware that iced It depends on humidity and cloudy sky in the nicht as well. In Germany we have a service that is called eiswarnung.de that give the ice warning for a specified location.

before: '08:00:00'

I agree. This is why I have the automation report the humidity when this occurs. Hopefully, this lets me get a better understanding of when frost will happen.

I did notice that. As mentioned earlier all the settings were input via the GUI editor. Could this be a failure of the GUI not properly translating to yaml?

If the temperature.is below 33 all the time, the trigger does not happen. You can circumvent that with an additional trigger at the first time (23:00) and repeating the “below 33 for an hour” in the conditions.

I used the UI for doing this

condition: time
before: '08:00:00'
after: '20:00:00'

Time condition windows can span across the midnight threshold if both after and before keys are used. In the example above, the condition window is from 3pm to 2am.

This is from the documentation from conditions.

Yep, I read it and edited it out just before your reply. Strangely, for sunset and sunrise it is required to use an or - per the same documentation. That was what I remembered.

That is a strange one. Odd that there was a discrepency.

No clue. This is what I get when editing completely via UI including weekdays:

condition: time
before: '08:00:00'
after: '20:00:00'
weekday:
  - mon
  - tue
  - wed
  - thu
  - fri
  - sat
  - sun

With the edit to my automations.yaml I’ll keep an eye on it and see if it triggers.

Not sure if it matters, but you should indent
- condition: time

condition:
  - condition: time
    before: '08:00:00'
    after: '20:00:00'
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun

No dice. The temperature dropped again last night and the automation did not trigger.

Seemingly all the criteria were met. The temperature dropped below 33 after 8pm but before 8am. It stayed below for over an hour.

To try and diagnose this I created a binary sensor using the threshold template. This will break the reading out to a sensor that can log separately. I will try it again.