rfscanlearn is obsolete in version 0.19.0
Home Assistant integration documentation does still show rfscanlearn parameter. So perhaps this integration still uses it which will fail to learn an rf command.
I just realized the cli readme is also obsolete. It still has the rfscanlearn command