Alarm Decoder Chime Toggle Error

I have recently setup my AD2PI to be integrated in with my HA. Almost everything works fine.
I utilized the code at https://www.home-assistant.io/integrations/alarmdecoder/#chime-status-and-control
but am getting the following errors when actuating the toggle.

[547578874512] sequence item 0: expected str instance, Optional found
1:15:48 PM – Home Assistant WebSocket API (ERROR)
Chime: Error executing script. Unexpected error for call_service at pos 1: sequence item 0: expected str instance, Optional found
1:15:48 PM – helpers/config_validation.py (ERROR)

I’m not sure where to start to trouble-shoot this. I have added my code into the secrets.yaml
Any insight is appreciatted.

For anyone that reaches this post with the same error after following the instructions mentioned above… you will need to add:

entity_id: alarm_control_panel.alarm_panel

in both your turn_on and turn_off sections.