Mqtt - master/slave switch

I have 2 instances of HA running. The master is running on a robust hardware platform and is used as my front end. I have remote instance running on a Pi to leverage the GPIO pins to control some RF devices using the rpi_rf switch platform. I am looking to control the switch on the PI from my front end. I have a single MQTT broker running on the master. Here is what the MQTT config looks like on each side:

Master:

mqtt:
broker: !secret mqtt_broker
port: !secret mqtt_port
client_id: HAmaster
username: !secret mqtt_username
password: !secret mqtt_password

mqtt_eventstream:
publish_topic: HAmaster_eventstream
subscribe_topic: HAslave_eventstream

MQTT Switch on master :

  • platform: mqtt
    name: Outdoor_Lights
    state_topic: HAslave_eventstream/switch.outdoor_lights/state
    command_topic: HAmaster_eventstream/switch.outdoor_lights/command
    payload_on: ‘on’
    payload_off: ‘off’

Slave:

switch on slave:
platform: rpi_rf
gpio: 17
switches:
outdoor_lights:
pulselength: 180
code_on: 4527411
code_off: 4527420

mqtt:
broker: 192.168.1.50
port: 1883
username: harmonyapi
password: !secret mqtt_password
client_id: HAslave

mqtt_eventstream:
publish_topic: HAslave_eventstream

Can you help me with this?

I was not able to get this working for the intended purpose and went a different route.