A PLCnext controller from Phoenix Contact as a powerful smart home device can be easily integrated via the REST API or Modbus TCP. The following link shows you a demo project how to do.
Using a PLCnext controller as a smart home device via Home Assistant (plcnext-community.net)