Creating new sensor based on attribure

Hi, I want to have a sensor to be on/off 0/1 based on Bluetooth device.

The issue is that I have specific BT device and I can’t use the attribute in conditional card (just for example), so I’m thinking about sensor to be turned on/off based if my phone connected or not to this specific BT device. Which type of sensor I need to create for this?

Look up template binary sensor.