Fireangel smoke alarm

I have bought the Angeleye ZBST-AE-630-EUR
This smoke detector has a zigbee Module.
I paired the device with zigbee2mqtt, that works but it is detected as a Carbon monoxide sensor, and none of the correct data is displayed in home assistant.

I found this page:

but when i try to save this script i get the error message:
“constructorclass is not a constructor”

Does anyone has ever got this device to work with the zigbee module?.

Thanks in advance