The two blueprints you linked are for ZigBee2MQTT (first one) and for ZHA (second one). You are using neither of those, you are using the Aqara integration.
I guess nobody wrote a blueprint to use the cube+aqara gateway. I wrote some automations to that, but it’s not in blueprint format. You may look into this: Xiaomi cube package to control lights and grab some ideas from that.
Hello my friend Im new in Home Assistant and I have the same Xiaomi Gateware Aqara integration for my Cube, but I don’t know how to make it work. Do you find some way???