Automating the sharing of sensors and switches between HA's using MQTT Discovery and Statestream

Great, you might want to shut off the automation after a period of time, especially with retain on.

  initial_state: 'on'

- delay:
    minutes: 1   
- service: automation.turn_off
  entity_id:  mqtt_config_entity_creator