Integrate a Bluetooth device with Home Assistant (Newbie)

I have a BLE device (kind of custom device) that turns on and shuts off when certain events occurs, and when it’s on, it sends data. I currently have Python code that I’ve written on my PC that is able to detect when the device turns on/off and is able to connect/disconnect and also log the data. It uses the bleak package and the device is found by using its name and it has a characteristic uuid that allows me to get the data.

I need to integrate the device using Home Assistant (Yellow). So in the end, the code wouldn’t be running on my PC, but on Home Assistant Yellow. I’ve looked at the sample integrations on Home Assistant’s website and also their developer’s documentation but it’s a bit over my head now.

Can anyone recommend a good tutorial or sample code that is easy to understand and/or close to what I’m trying to do?

Eventually, I want the data to be sent to the cloud but for now, I just want to be able to turn on Home Assistant Yellow and it’ll automatically start to detect the device and log the data.

Please advise.

Thanks