you may have a faulty gateway then, have a look over this thread,
seem’s @hoedha had one, and it worked all ok in the mi home app, but not with HA.