BLE seemingly isnt as easy as it should be (resource intensive it seems). There are a few options but mostly are using a secondary device (like a pi zero) to purely detect a BLE tag and then using MQTT turns on a switch in HA. Some folks have used multiple pi zeros creating a mesh and then use presence detection based on a rule if 1 or more of the MQTT switches are on.