Custom Tiles can access Things and Variables:
Keep in mind that this is really intended for cases where you want to display device data or variable data within a Custom Tile.
If you want to run logic when an event occurs, that’s better suited for something like rules. Otherwise the event would occur in every instance of the Custom Tile that’s actively displayed and run multiple times (or none if none are displayed).