As the error says, host is not a valid field for a remote.send_command service call, see the docs here. You are also missing the entity_id of the remote from which the command should be sent in your service data.
I get error: Failed to send 'JgBIAAABLJETNxMTFBEUERQRFBEUERU1ExITOBI4ExITEhM3EzcTExI4ExITEhM3EzcTEhMTEjgTEhM3EzcTEhMSEzgSOBMSEwANBQ==': 'You need to specify a device'
I get error: Failed to send 'JgBIAAABLJETNxMTFBEUERQRFBEUERU1ExITOBI4ExITEhM3EzcTExI4ExITEhM3EzcTEhMTEjgTEhM3EzcTEhMSEzgSOBMSEwANBQ==': 'Command not found'
I don’t know, maybe under Configuration -> Integrations -> Broadlink
I’m confused, in your initial post you said it’s working with remote.send_command and you just have an issue with the python script, but now it sounds like the service doesn’t work.
Learned codes storage location
The learned codes are stored in the /configuration/.storage folder in a file called broadlink_remote_xxxxxxxxxxx_codes.json. You can open this file with a text editor and copy the codes to set up a custom switch, but beware: the files in the .storage folder should never be edited manually.