Send Data to Another Pi on Network

You didn’t tell what system you put in place to exchange information.
There is no “auto-magical” transfer between the 2 instances.

See MQTT State Stream to MQTT Discovery - Blueprints Exchange - Home Assistant Community (home-assistant.io) for a “master/slave” HA configuration via MQTT.

If your “slave” PI doesn’t run HA, can’t you use plain SSH to send command from HA?