You can use the MQTT binding for this. Have a look here: Integration OH3 and HomeAssistant via MQTT binding