Automations not working since crash

Hi all,
I am having a problem that i really need help with. A while ago home assistant crashed on an update. I ended up reformatting. I changed out my zwave stick from a hubzusb1 stick to an aotec gen5 zstick because I had nodes that i could not get out of the hubzusb1 stick. Everything was working before the crash. I got my kwikset zwave locks up and working on the aotec stick. I have left the hubzusb1 stick in because it is still controling zigbee devices. but now the automation to lock my doors when alarm state goes from disarmed to armed_away. Although I can see the automation. When i arm the alarm my locks do not lock. I can see the automation and the locks when i manually tell the automation to execute it works and locks my doors. but when i arm the alarm it is suppose to lock my doors. It does nothing. I can see the alarm panel in states and can change the state of my alarm panel to armed but it does not lock my doors. Like I said I can just execute the automation and it does lock the doors. I can change the state of the alarm to armed_away but the automation will not lock the doors like it is suppose to. I am using a raspberry pi 4. I am using core-2021.3.4

What the trigger for the automation

I used the ui to make the automation my yamil file looks like this

alias: security1
description: ‘’
trigger:

  • platform: state
    entity_id: alarm_control_panel.alarm
    from: Disarmed
    to: armed_away
    condition: []
    action:
  • device_id: 2019199131e1e783f1000b71c4b78036
    domain: lock
    entity_id: lock.kwikset_spectrum_brands_unknown_type_0003_id_0541_locked
    type: lock
  • device_id: 5de555fe7ce15da945703db2e1ec1f19
    domain: lock
    entity_id: lock.kwikset_spectrum_brands_unknown_type_0003_id_0541_locked_2
    type: lock
    mode: single

So the trigger would be my alarm state moving from disarmed to armed_away

so the trigger would be the state of the alarm panel