Automation running a step that isn't configured

I have a script that turns my house “on”, and an automation to trigger that at 5:10:00AM. It was working fine, but this week I noticed one of the devices is switched on then off every morning. It wasn’t doing this until about 3 days ago. According the the trace, the automation clearly thinks it is supposed to wait 1 second then turn off the pantry switch.

Here are my scripts and logs, but I don’t see any reason for it to turn off. What else could I check?

script

alias: House - On
sequence:
  - type: turn_on
    device_id: 7e342ea3774bb2cde470acbb0aa32454
    entity_id: switch.pantry_outlet
    domain: switch
  - type: turn_on
    device_id: fe81692f4ac99371f8aab5ad1afd5546
    entity_id: switch.family_room_lamp
    domain: switch
mode: single

automation

alias: House On
description: ""
trigger:
  - platform: time
    at: "05:10:00"
condition: []
action:
  - service: script.house_on
    data: {}
mode: single

trace from this morning Notice the 1second wait and then pantry outlet is turned off

logbook entries

Go to Developer Tools → States and confirm the state of switch.pantry_outlet is currently off.

Go to Developer Tools → Services and use the switch.turn_on service to turn on switch.pantry_outlet.

Go to Developer Tools → States and check if the state of switch.pantry_outlet is in fact on or if it has reverted to off.

If it’s off then it implies there’s a communication problem with that device. When Home Assistant transmits a ‘turn on’ command to the device it expects it to promptly reply with an acknowledgement confirming it has turned on. If no timely acknowledgment is received from the device, Home Assistant reverts the device’s state to off. This might be what has been happening for the past 3 days.

I gave that a try and it does report as on.

In that case, what happens when you manually execute script.house_on (i.e. not triggered via the automation but either from Developer Tools → Services or from the Configuration → Automations & Scenes → Scripts view)?

I turned it off and manually ran the script - it worked as expected.

I turned it off again and manually triggered the automation - again, it worked fine.

This has me puzzled :thinking:

Me too. Hard to make suggestions for testing if the misbehaviour can’t be replicated on demand.

Grasping at straws here but do you have any other automations that trigger at 05:10 (or based on the state of the switch or script)?

No. I’m going to reboot the host and see if something is just off. Maybe the recent patch update to .5/6 messed something up. I guess I’ll report back tomorrow

It was fine this morning, but strangely it happened to the other light in that script :man_shrugging: Maybe my zwave network needs repaired