When you want to connect an IoT device to anything (or, for that matter, anything to anything), you should take a serious look at Node-RED, a free, open source visual process wiring system from IBM ...
Discover C.A.F.E., the visual automation editor for Home Assistant: interest, installation via HACS, getting started, tips, and limitations in beta.