Leviton automation

I have an automation that is supposed to turn a leviton wifi switch on and off at specific times. Sometomes the automation does not occur. What would cause this and is there any way to improve reliability?
Thanks

Can you post the YAML? Would be helpful to see the automation code.

In addition to the suggestion to post the yaml / automations, go to

  • Settings
  • Automations & Scenes
  • Pick the specific automation off of the list
  • In the upper right, click Traces
  • Review it, post an image of the flow with the yams

alias: String lights on 715a
description: ‘’
triggers:

  • trigger: time
    at: 07:15:00
    conditions:
    actions:
  • action: light.turn_on
    metadata: {}
    data: {}
    target:
    entity_id: light.string_lights
    mode: single
  • id: ‘’
    alias: String lights off 9a
    description: ‘’
    triggers:
    • trigger: time
      at: 09:00:00
      conditions:
      actions:
    • action: light.turn_off
      metadata: {}
      data: {}
      target:
      entity_id: light.string_lights
      mode: single
  • id: ‘’

it says no traces

How to format code or use the</> key in the post editor.

I think that means it’s not even trying to run. This looks like a straightforward automation, have you tried creating it by pressing “+ Create Automation” under Automations and Scenes?

Give this a try.


alias: String lights on 715a
description: ""
mode: single
triggers:
  - trigger: time
    at: "07:15:00"
    id: turn_on
  - trigger: time
    at: "09:00:00"
    id: turn_off
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id: turn_on
        sequence:
          - action: light.turn_on
            target:
              entity_id: light.string_lights
      - conditions:
          - condition: trigger
            id: turn_off
        sequence:
          - action: light.turn_off
            target:
              entity_id: light.string_lights

Also try these under the Template of your Developer tools

{{ now() }}
{{ now().astimezone() }}
{{ utcnow().astimezone() }}
{{ now().now() }}
{{ now().today() }}
{{ now().utcnow() }}
{{ utcnow() }}
{{ now().tzinfo }}
{{ now().astimezone().tzinfo }}
{{ utcnow().tzinfo }}

This block is wrong on multiple places. Did you get this from AI?
Automation Trigger - Home Assistant
Please check the official document and compare the correct format to your yaml. Do not rely on any AI.

trigger:
  - platform: time
    at: "07:15:00"
    id: turn_on
  - platform: time
    at: "09:00:00"
    id: turn_off

I have not checked other parts of your yaml.

Automation like this should be straightforward… you could have just use the automation user interface to build your automation. No need to make things more difficult than that.

For C or java or python, those AI / LLM models would have ample inputs to train with, but for HA configuration or automation? They have little data to train, and they wouldn’t know which is outdated and which is not, so when they are not sure… they would guess… and would guess wrong 9 out of 10 times.
If you are not using AI, then great. Read the official document and correct from there. Again do not rely on AI.