Master / Slave using Restful Sensor and switches to slave api

I have had trouble setting up a master slave in home assistant on a pi and mac. I was wondering if its possible to replicate it by adding each sensor on the slave as a Restful sensor on the master, likewise for the switches. Adding the sensor this way is the example below. Is there a way to automate the configuration and will there be any performance issues for automations? Thanks

There is an example of this on the restful sensor page. Works well for pulling data from another HA instance. I read about the issues with the master/slave and decided to go this route. Not sure what the polling rate is so it may be slow for something like presence detection and turning on a light. For remote temperature or just monitoring other items it works great.

Thanks, I set it up and there can be a lag of about 5 to 10 sec on the master / slave front ends on the same sensor connected with Restful Sensor. You are probably correct that automation will not work where 5 to 10 sec lag will be a factor.

I tried to setup a switch this way and see how that works but can’t seem to get the correct format. There is no example for switches, so any help would be appreciated.

I get this

16-12-23 09:30:04 Can’t turn on Is resource/endpoint offline?

I think it need to be in this format described here.